Most Popular
1500 questions
14
votes
5 answers
NodeMCU - use flash button as input in loop()
I couldn't find a proper answer on the net so I came here as a last resort.
So I want to use the FLASH button as an input in the loop() method.
Is there a way the check if it's pressed or not?
sOnt
- 145
- 1
- 1
- 8
14
votes
2 answers
How do I figure out if my board is approaching end of life?
I have a uno that I have been using for 3 years now. I will be using it again in a rather critical project in which failure on the part of the board could be rather expensive and dangerous. So, I would like to be sure that the board is not…
asheeshr
- 3,837
- 3
- 25
- 61
14
votes
10 answers
Sensor for underground water tank level
In a similar way to the question "best way to determine if a 5 gallon water jug is getting empty", I'm looking for a way to measure water in a container. This is so it can be connected to an Arduino for logging and reporting. But it's a very…
Rob Hoare
- 243
- 1
- 2
- 6
14
votes
1 answer
Why can't my IF statement see a global?
I'm rather new to Arduino programming. I have a problem compiling the following bit of code:
const int relay1 = 10; //Power Relay 1
const int relay2 = 11; //Power Relay 2
const int relay3 = 12; //Toggle Relay
const int button1 = 3;
const int…
MikeB
- 243
- 1
- 5
14
votes
2 answers
Pattern library for addressable LED strips
Is there any central place that we can get drawing pattern functions for the addressable LED strips like the once based on the WS2812B component? These are sold on the Adafruit site under the NeoPixel name. For example I know of a few pattern…
Dan McCreary
- 307
- 1
- 3
- 11
14
votes
3 answers
When using Arduino Uno as ISP does "Yikes! Invalid device signature" mean a bad connection, bad config, or bad version of avrdude?
I'm using an Arduino UNO to program a pre-compiled hex image to an ATTINY45, using the avrdude in the Arduino IDE directory, on Windows 7. The Uno has the ISP sketch loaded from the examples directory and that works- the heartbeat LED pulses…
Yary
- 361
- 1
- 2
- 7
14
votes
6 answers
Rename device name (ch340 usb to serial) Mac OS
Can't upload sketches to Arduino Nano clone with USB to serial chip ch340.
After installing drivers and plugging in, device has the name cu/tty.wch ch341 USB=>RS232 fa130 (with spaces), but Arduino can't recognize the full name (only tty.wch).
Is it…
Sonique
- 353
- 1
- 3
- 10
14
votes
4 answers
Why do sketches take up so much space and memory?
When I compile this sketch for the Yún:
int led = 7;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
}
I get:
Sketch uses 5,098 bytes (17%) of program storage space.
Maximum is
28,672…
hichris123
- 337
- 1
- 3
- 19
14
votes
1 answer
What's the difference between all the Software Serial Libraries? Which one is Arduino Nano compatible?
There are so many Software Serial Libraries, what are the differences between them? And which one I can use with my Arduino Nano? For my Arduino Nano I need one Hardware Serial Port and one Software Serial port at a baud rate of 115200.
On which…
William Roy
- 515
- 3
- 10
- 22
14
votes
4 answers
Can I use notepad++ for writing sketches?
Before I install the Arduino IDE, I was just wondering whether I could just use notepad++ to write the files and move them into correct location. I assume notepad++ doesn't support Arduino code, but I suspect there will be a mod for it, even though…
user3137
14
votes
3 answers
Returning an int array from a function
I have a function that needs to return 3 int values. I currently use an array declared in the global scope and I ask the function to write into them. Is there a way to make a function return an array?
Here is what I want to do:
int function()
{
int…
Dat Ha
- 2,913
- 6
- 23
- 45
14
votes
3 answers
Serial data showing up weird
I have a simple sketch that prints out "Hello World" to the serial, but I'm getting a bunch of gibberish instead.
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("Hello World");
delay(1000);
}
Why isn't it printing…
sachleen
- 7,525
- 4
- 39
- 57
14
votes
5 answers
How to change baudrate of ESP8266 (12e) permanently?
IMPORTANT: DO NOT USE AT+IPR=9600! (see update)
I have an ESP8266 12E module that communicates at 115,200 bauds. Since I use it with an Arduino Nano with SoftwareSerial things get messy. So I found that I should reduce the baud rate of the ESP…
mvermand
- 397
- 1
- 5
- 15
14
votes
4 answers
Using millis() and micros() inside an interrupt routine
The documentation for attachInterrupt() says:
... millis() relies on interrupts to count, so it will never increment inside an ISR. Since delay() requires interrupts to work, it will not work if called inside an ISR. micros() works initially, but…
Petr
- 253
- 1
- 2
- 12
14
votes
1 answer
Mysterious RX pulses on UART connect on OS X Arduino Due
Arduino IDE 1.6.8, Arduino Due, Mac OS 10.11.3
I am seeing eight mysterious pulses on the RX line when I connect to the serial port using multiple client libraries (Python, JavaScript as well as the built-in Serial Monitor in the IDE). About 78-79us…
Blake Ramsdell
- 241
- 1
- 2