Close

Starting to think about states and animations

A project log for 900 MHz radio

Hope RF module + Atmega 328

adellelinadellelin 04/20/2020 at 02:560 Comments

This weekend we started thinking about the possible states of the badges and getting one of them working. We started with 4 of the LEDs on the board that have pwm enabled, writing a slow chase where each of the LEDs fade on and off.

We're using the elapsedMillis library that allows us to access clock time whilst other processes are going on in the loop. The main concept is when elapsed time is more than the set duration, we reset it. 

Next thing was to set the state of each LED. All LEDs start in off state with only the first one on. In each loop, turn the next LED on, and turn the current one off. 

Code is in - RadioHead69_RawDemo_RX_0419b.ino

Discussions