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
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
1 answer
What is an ICSP pin?
What is an ICSP pin? I have read that it is an AVR and a tiny programming header for the Arduino, but what is an AVR and what does an ICSP pin do?
SpaceMonk
- 341
- 1
- 4
- 8
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
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
2 answers
Set PWM frequency to 25 kHz
I currently can set four PWM pins to around 31 kHz with the following code:
void setup()
{
TCCR1B = TCCR1B & B11111000 | B00000001; // Set PWM frequency for D9 & D10:
pinMode(pwmPin9, OUTPUT); // Sets the pin as output
pinMode(pwmPin10,…
user16307
- 227
- 2
- 4
- 14
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
14
votes
1 answer
Button state changing randomly
I have a push button wired to my Arduino but it seems to be triggering randomly.
I have one pin of the button connected to pin 2 on the arduino and the other connected to ground.
void setup() {
Serial.begin(9600);
pinMode(2, INPUT);
}
void…
sachleen
- 7,365
- 4
- 37
- 55
14
votes
5 answers
How to connect two Arduino without shields?
I'm planning an Arduino system that consists of several Arduino boards. The maximum distance between the boards is about 50 meters. I want to send basic data between these, like short strings or integers. I know I could send data through ethernet…
totymedli
- 2,839
- 3
- 18
- 22
14
votes
1 answer
What happens when code is uploaded using the bootloader?
When I upload a new sketch to my Arduino Uno using the Optiboot bootloader, what really happens?
What is sent to the Arduino?
How does it respond?
What does "not in sync mean"?
What is "in sync" anyway?
Note: This is intended as a "reference…
Nick Gammon
- 35,792
- 12
- 63
- 121
14
votes
4 answers
If I put a shield on an Arduino, can I use the Arduino for anything else?
I did some basic Arduino examples in the recent past, but I have never actually seen a shield for Arduino firsthand.
So I wonder: If I put a shield on an Arduino (for example, the Adafruit Motor Shield), does it "block" the entire Arduino, including…
Majiy
- 365
- 2
- 7
14
votes
5 answers
Programming options other than C++
Can I program my Arduino using any programming language other than C++? If so, which programming languages? What software would I need for compiling and loading my code onto the Arduino?
tstew
- 679
- 1
- 6
- 26
14
votes
2 answers
Yún boot from SD card
I have an Arduino Yún, and it only has 16mb flash onboard for the Linux. I was wondering of it is possible to put a bootloader on the flash that uses the sd card as a rootfs? i want to be able to do more projects on it than those that can fit in 16…
TheDoctor
- 3,429
- 1
- 20
- 39