Skip to content

ComplexArts/SensorBoardPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Complex Arts Sensor Board

This project has sample code for the Complex Arts Sensor Board written in Python.

You might also want to take a look at our Arduino demos for the Sensor Board.

Installation

You will need to download our custom binary version of the excellent micropython firmware that supports the BNO085 on the Sensor Board.

You will find the latest firmware binary in the latest releases. The firmware binary is the file firmware.bin.

Installation is done with the esptool.py as described in here.

First erase the ESP32 flash

esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash

Then program the firmware starting at address 0x1000:

esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z 0x1000 firmware.bin

Replace /dev/ttyUSB0 by whatever serial port your board is connected to. This can vary depending on the operating system you're using.

Demos

Two demos are provided:

  1. accelerometer.py
    Initializes the BNO085 and prints accelerometer readings over serial while blinking one of the user LEDs.

  2. orientation.py
    Initializes the BNO085 and prints orientation readings over serial while blinking one of the user LEDs.

The easiest way to install these programs on a board running the micropython firmware is by using a tool such as adafruit's ampy.

For example:

ampy -p /dev/ttyUSB0 put accelerometer.py

will copy the file accelerometer.py to the board.

You can run the program by connecting to the board using a serial monitor program such as picocom or minicom and simply importing

import accelerometer

after the REPL prompt. You might need to reset the board after using ampy.

Documentation

Detailed documentation for the module bno085, including a discussion of the above demos, is available here.

About

Sample micropython code for using the BNO085

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages