GithubHelp home page GithubHelp logo

led-swarm's Introduction

LED-swarm

Arduino based radio synced addressable LEDstrips

led-swarm's People

Contributors

chucks13 avatar

Stargazers

Roman Kot avatar  avatar d avatar Jesus Climent avatar Leo avatar eikerd avatar Nat Welch avatar Reed morse avatar  avatar Steve Eisner avatar  avatar Cory Logan avatar Mac Cowell avatar

Watchers

Hunter Luisi avatar Jesus Climent avatar Dave Mathews avatar eikerd avatar Cory Verellen avatar

led-swarm's Issues

bug w/ pushbutton: int overlfow, BUTTONUP should be 1

I built 2 test systems (nano + 60 ws2811) so I could play around with your code. While implementing a strobe function I noticed the code for triggering functions from button-presses wasn't working as expected.

The push button is connected to a pin configured w/ INPUT_PULLUP but the code that checks the button pin thinks BUTTONUP = 0 which is the opposite of what the pullup mode does.

The same code checks if buttonDownTime (an int) is > 50000 microseconds to determine if the button press was a short press. But max value for int is usually 32767, so the button events never trigger.

I'll upload my code to a fork later and do a real pull request if you want but in the meantime here's what I changed (starting from around line 159 in led_swarm_3.ino):

// BUG - button pin is set to PULLUP so BUTTONUP state should be 1, down 0
// const char BUTTONUP = 0;
// const char BUTTONDOWN = 1;
const char BUTTONUP = 1;
const char BUTTONDOWN = 0;

const char BUTTONONE = 0;
const char BUTTONSHORT = 1;
const char BUTTONLONG = 2;

const static uint8_t RADIO_ID = 1;                  // Our radio's id.
const static uint8_t PIN_RADIO_CE = 9;              // hardware pins
const static uint8_t PIN_RADIO_CSN = 10;            // hardware pins

#define SENDPERIOD 2000000                             // broadcast period in microseconds
#define MUTEPERIOD (SENDPERIOD * 3)
#define TAGID 0x426C6973  // tag code is 'Blis'
#define LEDPERIOD (1000000 / 60)                       // how often we animate
#define BUTTONSHORTTIME 50000
#define BUTTONLONGTIME 1000000
#define MIN_BRIGHTNESS 20
#define MAX_BRIGHTNESS 255

#ifdef USERADIO
NRFLite _radio;
#endif
uint8_t current[32];                                // anim state variables
bool radioAlive = false;                            // true if radio booted up
unsigned long timeToSend;                                     // how long till next send;
unsigned long muteTimer;
int brightness;
int program = 0;                                    // which application is running in loop
unsigned long lastTime ;                            // for calculation delta time

// BUG sized int max value is 32767 but BUTTONSHORTTIME is 50000 - so use long
// int buttonDownTime;                                 // for measuring button presses
unsigned long buttonDownTime;                                 // for measuring button presses

char buttonState;                                   // is the button up or down
char buttonEvent;                                   // what the button did (short,long)
char radioEvent = 0;                                // what the radio

// BUG (potentially) will cause problems if LEDPERIOD value is ever larger than INT 
//   (unless on Due?) int is too small use long
int timeToDisplay;                                  // how long to update the display
// long timeToDisplay; 

Swarm II pcb bug list

On facebook Chuck mentioned several minor bugs in the "Swarm II" board. This issue is for tracking those bugs and any progress made fixing them.

Look int0 the swarm folder now. There is a file called swarm3.zip, which I have been calling the Swarm II board. If you are talented in eagle...

  • I ask you to correct the wiring of the radio pins, and find a way to add a vcut so the board can be easily broken apart.

  • Also, the radio should be shifted a pin to the right, so it is right justified with the Teensy board. That will make the radio crystal clear the printed tube assembly bettter.

  • Another improvement would be holes for an optional capacitor like the one suggest in many of the NFR24L01 projects.

Thank you for FOSSing - planning to adapt for project

Hi Chuck,

This is an awesome project; thank you for sharing it and especially for sharing the code and board pcb fab files!

I am working on some wearable capes for my crew this year and have been looking into ways to wirelessly trigger effects when we are in a group.

Besides your project, I've been considering the electromage pixelblaze + firestorm server, which is an APA102 driver based on an esp8266 chip which provides wifi connectivity. It seems primarily designed for static installations but it might be robust enough for wearables that wander in/out of range - not sure, I will do some testing this summer.

I said hi over on your LEDs ARE AWESOME video post but I thought it might be nice to open this issue here as well if I can provide any informal documentation or notes for posterity while I try to replicate your sw/hw.

I ordered some pcbs based on the design in the repo (last updated 6 mo ago) for testing and then noticed your comment that they were out of date. That's ok, I'll figure it out; but if you could provide any details about hidden bugs you've fixed or important updates you've made in the unpublished code I'd appreciate it. I'll post my updates here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.