Turn Adafruit's EdgeBadge Into a Self-Contained Sensor Oscilloscope

Explore Adafruit's EdgeBadge with edgemicscope, a CircuitPython script that charts light, sound, and accel sensors on a scope display.

James Lewis
2 years agoPython on Hardware
edgemicroscope measuring light in real-time

Previously we wrote about the EdgeBadge from Adafruit. It is a SAM D51-based board that comes with TensorFlow Lite ready-to-go. The board contains a variety of sensors, which makes it ideal for machine learning or as a fun electronic badge.

Tom Anderson created edgemicscope, a CircuitPython application that takes the EdgeBadge in a different direction. His script charts the output of the on-board sensors as an oscilloscope trace on the 160x128 TFT display. The screen updates fast and reacts in real-time to the sensors' changes. Pretty amazing for a Python script!

Drop the code.py file onto the EdgeBadge to get the accelerometer and light sensor working immediately. There is a small hardware fix necessary to get the microphone working. Anderson says you need to connect Pin 5 to TX and Pin 6 to D12. However, even without that change, the code runs okay. The mic input displays a flatline without the fix.

We did need to update our EdgeBadge to the latest CircuitPython 5.0 Beta. As a reminder, connect the EdgeBadge to a computer, put it in DFU-mode with a double-tap of the RESET button, and then drag the new CircuitPython df2 file to the drive "PYBOOT."

After the board updates and reboots, do not forget to copy over the updated CircuitPython Library bundle to go along with the updated CP version.

Overall, edgemicscope is an excellent example of how Python, or CircuitPython specifically, enables rapid application development.

Download edgemicscope's code from GitHub.

James Lewis
Fan of making things that blink, fly, or beep. Host on element14 Presents, baldengineer.com, AddOhms, and KN6FGY.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles