element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sensors
  • Technologies
  • More
Sensors
Blog CircuitPython on Wio Terminal
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Sensors to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 12 Dec 2022 6:15 AM Date Created
  • Views 1213 views
  • Likes 11 likes
  • Comments 1 comment
  • bme280
  • circuitpython
  • neopixel
  • ms8607
  • wio terminal
Related
Recommended

CircuitPython on Wio Terminal

ralphjy
ralphjy
12 Dec 2022

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:

  1. CircuitPython
  2. Arduino
  3. Raspberry Pi Pico
  4. Raspberry Pi
  5. Micro:bit
  6. ESP32

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.

image

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".

image

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.

image

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.

image

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.

image

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.

image

Finally, since it's the holidays, I decided to try a NeoPixel strip and did a quick demo video.

image

Happy Holidays!

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

.

At this point, I'm ready for my Person-Sensor...

  • Sign in to reply
  • baldengineer
    baldengineer over 2 years ago

    Oh, cool to know that support has gotten better!

    I like working with CircuitPython. Maybe I can find finally find a use for my Wio Terminal!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube