Skip to Content
Lumensalis CircuitPython framework coming soon 🎉
ProjectsLumensalis CircuitPython FrameworkDocumentationGetting StartedGetting Started

Getting Started

⚠️
Warning

The getting started section is still a work in progress. It covers much of the process you need to go through, but it is incomplete and needs a bit more work before you can simply “follow the directions” to get everything working. If you need help, please join the Lumensalis Discord Server 

How would you like to get started with the LCPF?

  • Easy mode : Follow our Quick Start Guide, which contains

    • a list of all the parts you need to start adding effects to your project with the LCPF

These are general directions for getting started with the LCPF.

If you want a guide for getting started as easily as possible, quick and easy set of specific instructions, for your controller, see Supported Controllers.

Complete Initial Setup on your controller

  • Install CircuitPython and the TerrainTronics bundle on your controller.

Setup a supported editor

WARNING: Not all editors work well for CircuitPython1. Starting with Mu or Thonny is highly recommended unless you are already familiar with Python, USB serial device access, and ESP32 development or VSCode.

Setup a USB serial console interface

You need the ability to see console text output (error messages, print statements, …) from your controller. The editors listed above (with proper configuration / extensions) already have this built in. Otherwise, you need a terminal program that can connect to a USB serial device.

code.py

CIRCUITPY:\code.py is a very special file. It is loaded and run each time your controller starts (or restarts)2

Uploading your code

For a controller running CircuitPython with a CIRCUITPY drive, simply saving your changes to CIRCUITPY:\code.py (or any other file on your CIRCUITPY drive) is all you need to do1. There is no separate “firmware upload” step required. For example, here’s what you’d see saving

print( "Hello there!\n" ) from TerrainTronics.Demos import CaernarfonFrankenDemo CaernarfonFrankenDemo.demoMain()

to CIRCUITPY:\code.py with Thonny :

alt text

Playing with Demos

There are files for demos In CIRCUITPY_DRIVE__:\libs\TerrainTronics\Demos_

CIRCUITPY_DRIVE:\code.py is a file that gets automatically run when the controller boots

There are a number of ways to run a demo. For example, to run CaernarfonLavaLights (at CIRCUITPY_DRIVE:\libs\TerrainTronics\Demos\CaernarfonLavaLights.py ), CIRCUITPY_DRIVE:\code.py could look like

from TerrainTronics.Demos import CaernarfonLavaLights CaernarfonLavaLights.demoMain()

or you could copy the contents of CIRCUITPY_DRIVE:\libs\TerrainTronics\Demos\CaernarfonLavaLights.py into CIRCUITPY_DRIVE:\code.py and add demoMain()

# copied contents from CaernarfonLavaLights.py ... demoMain()

at the end

Notes

Footnotes

  1. Not all editors save files “properly” when using a USB device. Files can get partially written and/or take a while before the changes are actually written to the drive. See Adafruit’s Recommended Editors  for more details. ↩ ↩2

  2. Technically it isn’t always run - if the code in your controller crashes, it can go into “safe mode” which causes it to skip loading code.py on the next reset.running on ↩

Last updated on