New answers tagged

0

I managed to do this with another library with "doFlash(5)" but I have to work with LC basetools in this scenario and I can't figure out how to do it. It looks like you are still allowed to write Arduino code in your sketch, so why not use the BlinkWithoutDelay "concept" and just write your own code. I would favour an OOP solution for ...


1

First of all, considering your comment: "I don't have time [...] to tackle arduino programming" - If you don't learn how to code, then you can't work with code (and that includes putting together libraries you find on the internet). And learning takes time, it's that simple. I recommend you forget about those libraries and implement that easy task ...


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 ...


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....


-1

So the problem is fixed by adding Serial.setTimeout(1) ; inside setup(), which tells Serial.readBytes() to wait for 1 milliseconds maximum.


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 ...


0

Three 1 Watt LED could potentially draw 600 mA total, exceeding the maximum draw for the Arduino. Each LED could draw 200 mA, exceeding (by 10x) the draw of a pin driver. So, yes, you need to supply the LEDs separately from the Arduino. Also, that driver is a constant-current driver, at 330 mA per channel. Your LEDs would prefer a constant voltage, chopped ...


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 ...


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}...


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. ...


Top 50 recent answers are included