LumiDrive Hookup Guide

Pages
Contributors: Elias The Sparkiest
Favorited Favorite 5

Read-Evaluate-Print-Loop (REPL)

A note about the Read-Evaluate-Print-Loop, or the REPL. It's a language shell that allows you to interact with the LumiDrive in an Interactive Python environment. If you pull up your favorite serial program and open it to the COM port of the LumiDrive you should see the following.

Terminal Window showing REPL

Having a hard time seeing? Click the image for a closer look.

Main.py will be running an infinite blink loop fresh out of the box. Simply press CTRL-C to interrupt the code. Here you have an interactive python environment to play around in.! Here we can do some fun things like Math!

Terminal window showing math example

Having a hard time seeing? Click the image for a closer look.

More importantly we can see what libraries and pins are available to us in the version of Circuit Python that is loaded on your LumiDrive, using the help(modules) and dir(board) commands respectively.

Terminal window showing  help modules and dir(board)

Having a hard time seeing? Click the image for a closer look.

If you look at the line that says dir(board), just below are various pins that are available in Circuit Python but not all of them are physically broken out on the board. When you're done messing around in REPL and ready to run the code that is on your LumiDrive, you can press CTRL-D and that will initiate a soft reboot.