Skip to content

Commit

Permalink
Make example work with ATmega32U4 based boards
Browse files Browse the repository at this point in the history
Tested with Arduino Micro
  • Loading branch information
e-henry committed Aug 22, 2016
1 parent 8160f64 commit c3ba50c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Features

* 44 different effects. And counting.
* Free of any delay()
* Tested on Arduino Nano, Uno and ESP8266.
* Tested on Arduino Nano, Uno, Micro and ESP8266.
* All effects with printable names - easy to use in user interfaces.
* FX, speed and brightness controllable on the fly.

Expand Down
6 changes: 6 additions & 0 deletions examples/serial_control/serial_control.ino
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ void setup() {
void loop() {
ws2812fx.service();

// On Atmega32U4 based boards (leonardo, micro) serialEvent is not called
// automatically when data arrive on the serial RX. We need to do it ourself
#if defined(__AVR_ATmega32U4__)
serialEvent();
#endif

if(cmd_complete) {
process_command();
}
Expand Down

0 comments on commit c3ba50c

Please sign in to comment.