Touch_and_Go v1.4.1
Additional Information
The information on this page is not required for normal assembly and use of the timer. It’s only provided to help with potential problems you may encounter and to provide some insight if you would like to learn more about using CircuitPython on microcontrollers and how they function. To a limited extent, the Touch_and_Go program can be further customized to suit your particular requirements.
CircuitPython
CircuitPython is a user-friendly programming language. It is a subset of the official Python language suitable for use on microcontrollers. Everything you need to know about CircuitPython can be found in an extensive tutorial from Adafruit.
A useful tool for interacting with the actual timer program is a dedicated code editor. Adafruit recommends downloading and installing a user-friendly editor called Mu. The guide to installing Mu can be found here. The code editor allows you to open the timer code for editing and customizing. As soon as you save your new code to the CIRCUITPY
drive it will automatically start to run. Unlike Arduino no pre-compiling is necessary.
The most useful feature of a code editor is the ability to connect and interact with a microcontroller using a serial console. How to open a serial console window in Mu is described here.
Another feature of the serial console is called the REPL. Using the REPL you can communicate directly with the microcontroller. Using the REPL is explained here.
If you only want to make a simple revision to the program code, the main.py file can be opened and edited using a simple text editor like Notebook or TextEdit. After you save your revision the timer will automatically restart and run the revised code.
If you make an error in programming the main.py file can always be overwritten with a new downloaded copy.
Trinket M0
The Trinket M0 is a compact microcontroller development board that uses a ATSAMD21 microcontroller from Microchip Technologies.
The Trinket M0 it has a very limited memory capacity. It is possible to run into conditions were you may receive a warning that you have run out of space when trying to upgrade your program code. If you encounter this issue try erasing the CIRCUITPY
drive using the REPL by following these steps. Once the drive has been erased then you should be able to drag and drop the main.py file and the complete lib folder back onto the drive.
The Trinket M0 is fully operational when powered by either the ESC or the USB port. As a matter of fact, there is built-in diode protection and it can be safely powered by both simultaneously.
Down the Rabbit Hole
If you wish to learn more about electronics, both Adafruit and Sparkfun can provide the supplies and equipment for experimenting and learning. On the surface, both of these companies appear to be retailers of electronic devices for the maker community. In reality, they are best described as companies with a primary goal of education. To that end, they encourage experimentation by offering beginner-oriented electronic products along with comprehensive online learning tutorials.