Custom Playback Logic
Using the built-in features of the Bottango application and firmware, you can trigger animations:
- On startup
- As an idle animation
- On button press
- On pin state (digital or analog read)
Creating Your Own Playback Logic
Section titled “Creating Your Own Playback Logic”If you want to create your own animation triggering logic, you can modify the firmware to meet your needs. The documentation for the open source firmware introduces how to structure animation triggering code in the Bottango firmware.
Exported Playback Custom Logic Firmware GuideCombined with the changes in the previous page to configure the firmware for these control boards, you can modify the callbacks file to implement your own logic, then reflash onto the Bottango control boards.
Using the guide linked above, you can implement any kind of custom C++ animation triggering logic. Some examples given in the guide above are creating an animation playlist or playing a random animation on a button press.
Using Bottango Nova’s GPIO
Section titled “Using Bottango Nova’s GPIO”Bottango Nova has eight exposed GPIO male header pins. You can connect sensors, buttons, etc. to the GPIO pins for your own logic. Of note, there are no physical pull-up or pull-down resistors on the GPIO pins. You will either need to supply them if needed, or use INPUT_PULLUP or INPUT_PULLDOWN when setting pin mode to use the microcontroller’s internal resistors.
Using the Qwiic Connector
Section titled “Using the Qwiic Connector”There is a Qwiic connector on the back of each board. You could use a Qwiic peripheral to add sensors, etc. to a control board for animation triggering logic. See the page for using Qwiic peripherals for more details, limitations, etc.
Using the Built-In Buttons
Section titled “Using the Built-In Buttons”If you want to modify the behavior of the built-in “A/B/C” buttons, you can create your own logic. You can also extend the built-in buttons using your own external buttons.
Bottango Nova Buttons
Section titled “Bottango Nova Buttons”- Button A is on pin 34
- Button B is on pin 35
- Button C is on pin 36
Each button has an external pull-up resistor. Set pin mode to INPUT and digitalRead() will return LOW when pressed and HIGH when unpressed.
Bottango Solar Buttons
Section titled “Bottango Solar Buttons”Bottango Solar buttons are on a “button ladder” on pin 39. You will need to check an analog voltage range on pin 39. Set pin mode to INPUT and check with analogRead().
- Button A will be an analog read value on pin 39 between 2350 and 3650
- Button B will be an analog read value on pin 39 between 1250 and 2250
- Button C will be an analog read value on pin 39 between 550 and 1150