Project Orbit Version 2

Summary

This project builds upon the "Orbit POI V1" project and adds a button which allows the user to select different operating modes such as the POV image generator or a fire effect.


Introduction

The main physical aspect of this project was to upgrade the version 1 poi by adding a momentary push button. This button allowed many different operations to be accessed instead of just a pattern generation program.
Through the use of the one button library available here. this button can have different states which were; click, double click and long press.
A state machine was created to utilise the functionality of the button using the different button states as a stimulus to switch between the different program states. See the table below for more information a series of effects were created each with 2 operating modes. An options menu was also created which allows the user to change the brightness of the poi without the need of a computer.
At the same time the communication between the micro controller and the LED strip was changed to dedicated hardware instead of software, effectively speeding up the communication speed and therefore the maximum refresh rate of the LEDs.



Changes

The Button

The button is a simple momentary push button toggle which can be found in practically every electronics store. A red wire and a black wire were soldered on to the pins and heat shrink was used to cover the joints. The loose end of the red wire was soldered to pad 24 on the bottom of the Teensy and the black wire was soldered to a nearby ground.


Communication Changes

The communication between the LEDs and the micro controller was facilitated by a software enabled link in version one of this project. While suitable at the time a much faster way was discovered and has now been implemented. The table below shows a list of changed hardware.

Function Old Pin New Pin
Serial Clock 3 13
Data Out 2 11

An issue with the pin change was that the on-board LED was tied in to the Serial Clock line. The version one of the program illuminated this LED as a power indicator to signify the system is turned on.
I’m not sure if using this pin would cause any problems so I have disabled it in the latest version.


Code

The New Program

When the poi are first switched on they display the user selected images with a long press of the button activating a different set of images. Clicking the button advances the poi through the different effects with a long press activating that effects alternate mode. Double clicking the button at any time activates the option menu which allows the user to change the brightness.