New answers tagged

0

do I have to set it up with separate RGB LEDs and daisy chain them? That's exactly, what the string of Neopixels, that you linked, is: Separate WS2801 RGB LED chips, which are daisy chained together. Since the distance of the LEDs on the string is not 4-5 feet, you cannot use the string directly. You can either cut the string and extent the cables, as you ...


0

In general, in many engineering efforts, a definition of the feature(s) and constraints need to be considered. The feature you are creating is a large-7-segment-display. Now decide what constraints you are working under. Normally, in embedded programming, this means limited memory, limited power and interacting with people. Because of limited memory, ...


1

First, for all the digits I'd use an 7 value array, indicating for every segment if it's ON or OFF. So for 0 your get byte digit0[] = {1,1,1,1,1,1,0}, where 1 indicates the segment is ON, and 0 indicates it's OFF. Your code then becomes: void Print0(CRGB myColor){ //Prints the digit 0: for(int i=0; i<7; i++){ if( digit0[i] ) leds[i] = CRGB (...


0

As a general rule, you should avoid repeating yourself whenever you can. Thomas Weller showed you how to avoid repeating the LED handling code by using an array: int leds[] = {8, 7, 6, 4}; This is a data structure that your program can loop through, handling the repetition itself. In a way, you are converting redundant code into data. This is a really good ...


1

//is this right?? counter = digitalRead(buttonPin); No. Just remove that. It will change your counter to either 0 (low) or 1 (high). it doesn't seem to work: It's because all your comparisons are actually assignments: if (buttonState = HIGH) [...] if (counter = 3) [...] For comparisons, you need two equal signs like ==. Another issue: your LEDs will ...


0

The function digitalWrite has a capital W... in C/C++ and most computer languages, functions/variables etc. are case sensitive. Mostly (but this depends on the language, and on the preference of the writer), the first character starts with a capital or not. This is called Camel Case, compared to Pascal Case, see https://en.wikipedia.org/wiki/Camel_case. ...


0

There's a rather nice Adafruit tutorial on how to implement this (beyond the one listed already): https://learn.adafruit.com/multi-tasking-the-arduino-part-1 I disagree with the approach given, since it requires that all tasks be polled manually and that you implement it to each task, but the design itself is really clever. You may also want to check out ...


1

There is a function that invert the colors of your screen, you can pick either black on white or white on black, I have tried it and I have quite experience with your display, I think you should try this piece of code. At the beginning of your Arduino code be sure that you declared the object using the same name. Adafruit_SSD1306 display(SCREEN_WIDTH, ...


0

Literally spent hours painstakingly chasing same problem. Complained bitterly to supplier that board refused to respond or operate when received. They responded by trying to tell me I had no clue about how to connect, but eventually agreed to send replacement after I proved had connected correctly, while waiting for replacement came across this post, went ...


0

It is a preloaded sketch and will be overwritten when you upload your first sketch into the Arduino. Typically it's the Arduino Blink sketch which can be found here: https://www.arduino.cc/en/Tutorial/Blink Which has the following (functional) content: // the setup function runs once when you press reset or power the board void setup() { // initialize ...


Top 50 recent answers are included