Hot answers tagged

3

Found the Adafruit NeoPixel is the reason for the problem (or the way it is implemented above is not the best). Solved with the fastLED library as below: #include "FastLED.h" #define NUM_LEDS 128 #define DATA_PIN 14 #define BRIGHTNESS 10 CRGB leds[NUM_LEDS]; int delayval = 10; // delay for half a second boolean N0[8][8] PROGMEM = {{0,0,1,1,1,1,0,0}...


2

When sending multiple bytes which together form a single message it is best to use a delimiter character and read the data until there. That way you don't run into timeouts and you can be sure, that the received data represents a full message. In the cases where the LEDs need 1s to react you are most likely sending less than 3 bytes, which causes the Serial....


2

It's just a string of WS2812B LEDs that have been "bent" into a grid. You treat it exactly like any other WS2812B strip of LEDs. You have 256 LEDs, and as far as the Arduino is concerned, they are just in a line numbered 0-255. The "grid" arrangement is solely down to you to you to calculate. Fortunately 256, or 16x16, is very easy to ...


1

This buildin LED is connected to an IO pin of the microcontroller on the Mega (most commonly pin 13, but might be different depending on the board). So the meaning depends on what the code on the Mega does with it. When the board is reset (which happens on opening of serial connection), first the bootloader will run. It gives you a short blink on the buildin ...


1

On the Arduino UNO pins 0 and 1 are used for serial communications. That might not make a difference here, but it's probably a good idea to avoid them unless really needed.


1

You're calling Serial.readBytes() when there may or may not be 3 bytes available. If there aren't 3, the call waits for them to arrive or for a timeout. That's the delay you are seeing. If you really want 3 bytes at a time, check whether there are 3 before you try to read them: if( Serial.available >= 3 ) len = Serial.readBytes(buf, 3); When the if ...


1

Question is - do I have to have two power supplies? No, you can use one power supply for both. But you need to make sure, that the LED current is not flowing through the Arduino, since that can kill the Arduino. To do that, you need to connect the power supply to the LED driver and the Arduino in parallel. For example, lets assume you have bought a 5V ...


1

The way you have it set up is fine if you aren't going to light up all the LEDs at full brightness. And if you do, you're not going to break your ESP32 Dev Board the way you have it set up in your diagram (since you are not running the power THROUGH the board). The LiPo battery probably has its own little regulator on it to prevent it from being damaged. ...


Only top voted, non community-wiki answers of a minimum length are eligible