I've tried CircuitPyhon on a Wio Terminal before just to verify that it worked, but that was at least a couple of years ago. I had backordered a Person-Sensor from SparkFun back in October and I just got notified that it had shipped.
The Person-Sensor is the first product from the UsefulSensors startup that was founded in March by Pete Warden and Manjunath Kudlur. I just watched a Youtube Video with Edge Impulse and Useful Sensors discussing the Person-Sensor - Edge Impulse x Useful Sensors AMA.
Anyway, I looked on their gtihub repo - https://github.com/usefulsensors/person_sensor_docs and they have examples of using the sensor with quite a few development platforms:
- Raspberry Pi Pico
- Raspberry Pi
They have an example running CircuitPython on the Wio Terminal that will display the relative position of the face detected bounding boxes in the image - https://github.com/usefulsensors/person_sensor_images. That would be neat to run OOB when I get the sensor, so I thought that I would make sure that I have a working installation of CircuitPython on the Wio Terminal.
Those of you that have worked with CircuitPython know that it is easy to install. The Wio Terminal like many development boards nowadays comes with a UF2 Bootloader pre-installed that creates a USB drive called "Arduino" when you enter bootloader mode with a quick double press (or toggle in this case) of the reset switch.
At that point you can drag and drop UF2 files on the drive to install them. CircuitPython.org maintains specific OS versions for each individual board type. I downloaded the latest beta version CircuitPython 8.0.0-beta.5 since that's what UsefulSensors had used. Then just dropped that on the drive. It installs CircuitPython and renames the drive to "CIRCUITPY".
There is a lib directory where you can copy any libraries that you need and a code.py file that will be run on boot/reset.
The next step is to download the CircuitPython libraries that you need. You need to be sure that the libraries were compiled for the version of CircuitPython that you installed. I downloaded adafruit-circuitpython-bundle-8.x-mpy-20221210.zip from https://circuitpython.org/libraries. Then you unzip the file and select the libraries that you need and copy them to the lib directory on the CIRCUITPY drive.
A quick view of the libraries I copied for the sensors I decided to try.
I've been using the Thonny IDE on RPIs for running MicroPython, but I'd previously used Mu on my Win10 PC with CircuitPython - so I decided to continue using Mu. The Person-Sensor interfaces via I2C, so my first test was to try an I2C sensor. I had an MS8607 Pressure/Humidity/Temperature sensor with a Grove interface handy, so I thought I'd try that first. Unfortunately, as Murphy would have it - this failed with an Input/Output error when trying to read one of the sensor registers. This is a known working sensor (used it with the Arduino IDE), so I suspect an issue with the library that I'm using.
Then, I decided to try a TSL2591 Light Sensor - and that worked correctly. You can see the readings drop in the Serial console as a result of my moving my hand over the sensor.
Next I tried a BME280 which is a PHT sensor like the MS8607 - and that also worked although I needed to change the default I2C address from 0x77 to 0x76 because I am not using an Adafruit board.
Finally, since it's the holidays, I decided to try a NeoPixel strip and did a quick demo video.
At this point, I'm ready for my Person-Sensor...