Most Popular
1500 questions
4
votes
3 answers
Programming Arduino Uno R3 to trigger a relay once every 24 hours
I programmed an Arduino Uno R3 to trigger a relay once every 24 hours from the moment it is powered on.
I calculated milliseconds and used the function delay().
24 hours * 60 minutes each hour * 60 second every minute * 1000 milliseconds every…
Felix0004
- 43
- 4
4
votes
1 answer
Arduino nano 33 ble vs ble sense. Power consumption, etc
After working with an Arduino Uno at work, I am looking to buy myself a board for some projects/experiments at home. The nano size seems like a great option, especially the one without soldered headers, as it is very flexible and easy to fit in…
qeiynn
- 43
- 4
4
votes
1 answer
What is the logic behind Arduino inlining `HardwareSerial::_rx_complete_irq()` for receiving serial data (but NOT `_tx_udr_empty_irq()`)?
Q: What is the logic behind Arduino inlining HardwareSerial::_rx_complete_irq() for receiving serial data (but NOT _tx_udr_empty_irq()), and when is it advisable?
From the bottom of the HardwareSerial class in HardwareSerial.h:
// Interrupt handlers…
Gabriel Staples
- 1,375
- 11
- 27
4
votes
1 answer
ESP-01 does not run code after Deep Sleep
When using the deep sleep functionality on several ESP-01 boards, the boards require two resets in order to wake up properly (regardless of whether the resets are done by manually bridging the rst pin or by soldering a wire to do it from an…
sassoPera
- 303
- 1
- 10
4
votes
1 answer
MEGA 2560: Simple program - One analogWrite turns off the other
I'm using Windows 10, Arduino 1.8.12 (Windows Store 1.8.33.0)
I have an Arduino MEGA 2560 and a red LED connected to pin 4.
#define RED 4
#define GREEN 2
void setup() {
analogWrite(GREEN, 0);
analogWrite(RED, 100);
}
void loop() {
}
This…
Mark
- 197
- 1
- 1
- 8
4
votes
3 answers
How compile an Arduino program for a desktop PC
I have an arduino program that only does serial communications with a little bit of math, and I am writing another one to communicate with it on a second arduino. For testing purposes I was hoping I could run the serial only program on my desktop. …
bob mcgrath
- 55
- 2
- 4
4
votes
2 answers
How to connect to MQTT broker with TLS?
I have ESP8266 which is connecting to MQTT broker and it is working ok using user+pass with following code:
#include
#include
const char* ssid = "WIFINAME";
const char* password = "WIFI_PASS";
const char*…
iWizard
- 143
- 1
- 1
- 5
4
votes
4 answers
How can I set up outputs without using digitalWrite?
Consider the following:
#define IN1 9
#define IN2 10
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
void LeftMotor(Direction direction) {
digitalWrite(IN1, direction == Forward ? LOW : HIGH);
digitalWrite(IN2, direction == Forward ? HIGH :…
OrElse
- 57
- 1
- 2
- 7
4
votes
2 answers
Digispark clone not recognised when plugged in
When I plug in my digispark clone the computer doesn't make any sounds or some kind of acknowledgement that it has been plugged in. Anyone know why this may be or is it just a dodgy clone?
davidbrok5
- 41
- 1
- 1
- 2
4
votes
3 answers
Spiffs vs Eeprom on esp8266
In my project, i have some data to save permanently. After some research i got many examples and informations to do that with eeprom. I used it effectively.
After all i decide to deep dive to esp8266 and i got some information about spiffs.
Now i…
Dogan Cignakli
- 95
- 2
- 11
4
votes
1 answer
Measure lipo voltage while powering arduino
I have a arduino pro micro 5V that I want to power with a 3.7V lipo. I also have a charging module to charge the lipo.…
Robbe
- 109
- 1
- 1
- 8
4
votes
3 answers
Powering the Arduino with a battery and reading the battery voltage
I am trying to display the battery voltage as it is being used to power the Arduino.
I have tried powering the Arduino through the USB and the battery voltage is read accurately when compared to the multimeter reading.
But when the battery is…
acho
- 43
- 4
4
votes
1 answer
Using usb port to communicate with standalone atmega328p circuit
noob here
So I managed to get my circuit to be a standalone circuit (as pictured below). I want to use this circuit as an input to a game on my computer. What I want to know is could this micro-usb breakout board…
user19964
- 61
- 2
- 6
4
votes
1 answer
Measuring 12 V via voltage divider: choosing the right resistors
I want to measure a 9 V battery via one of the analog input ports of my Arduino Nano. From all the schemes of this great answer, I choose the simplest one, the voltage divider. Assuming the maximum input voltage to be 12 V (just to be safe) and…
madhead
- 143
- 4
4
votes
2 answers
How to document a custom library in Arduino
I have created my own library and it is working flawlessly. Now I want to add some documentation to it that the Arduino IDE can understand.
For the functions from the Arduino IDE itself like delay(ms) you can right click them and then select Find in…
LukasFun
- 295
- 1
- 4
- 17