Hot answers tagged

4

There are 3 LEDS on the Nano 33 BLE: A power LED on pin 25 (yes, you can turn off the power LED programatically); A built-in LED on pin 13; An RGB LED with red on pin 22, green on pin 23, and blue on pin 24. In the variant file, they are given names: #define PIN_LED (13u) #define LED_BUILTIN PIN_LED #define LEDR (22u) #define LEDG (23u) #...


3

You may be finding Connect to LCD via I2C, default address 0x27 (A0-A2 not jumpered) confusing. These refer to the I2C address selection lines of the IO expander (the PCF8574T) used on the I2C LCD display and not to the A0-A2 analog pins of the Arduino itself. The note // Wiring: SDA pin is connected to A4 and SCL pin to A5. is referring to the analog pins ...


3

No! Most likely it will not work. An LED lights up if the Voltage between the Anode (one side of the LED) and cathode (the other leg) exceeds a so called forward voltage (Vf). This Vf depends on the creation process and differs between different colors. Vf can be between abt. 1.8 Volt (red LEDs) and abt. 4.2 Volt (blue LEDs). Even if the LEDs would have the ...


2

This comes up ALL THE TIME. Don't use delay. Do a Google search on "arduino blinkwithoutdelay" and read one of the various write-ups on the subject. Here's a writeup that looks pretty good: https://learn.adafruit.com/multi-tasking-the-arduino-part-1/using-millis-for-timing


1

Just found this: https://forum.arduino.cc/index.php?topic=311099.0 Turns out you can use the analog pins of an Arduino UNO using this: pinMode(A1,OUTPUT); digitalWrite(A1,HIGH); You just have to list it as an analog pin. Seems to be working, don't think there are any downsides, as far as I see.


1

No. You will destroy the Arduino and the bluetooth module. Firstly the Arduino needs no more than 20V absolute maximum - recommended no more than 16V. Secondly a resistor is not a voltage regulator. It can only drop a fixed voltage when you have a fixed current. It only works with LEDs because they are themselves a fixed voltage. Thirdly an Arduino output ...


1

My solution: uint16_t st_led=0; uint16_t et_led=0; while((TIFR1 & (1 << OCF1A))==0) //30 second { st_led=TCNT1; et_led=st_led; while((et_led-st_led)<=15624) //1 second { et_led=TCNT1; } PORTA ^= (1<<ledno); } TIFR1=(1<<OCF1A); TCCR1B=0;


1

Your waiting loop runs much faster than once per millisecond, and even faster per second. So to get just one "event" per second, you need to detect the change of the second. void wait_function() { timer_init(); for (int second = 0; second < 30; ++second) { // 30 second wait // Wait for the next second int old_second = read_counter() /...


1

After spending way too much time on the code, I figured that it had to do with something entirely different: The RFID reader created an RF interference on the data wire towards the LED strip... Shielding it properly did the trick, no matter which pin is being used. Thanks for the help anyway.


1

I think it is because of power consumption. If the LEDs consume lots of power, the LED on Arduino(typically mini red LED) will be off or faded. So before you connect the LEDs, check the mini red LED which is on Arduino and after connection the LEDs, check ones again. If the red LED is faded or off, the problem must be power consumption. Connect 12v or 5v ...


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