Most Popular
1500 questions
11
votes
7 answers
Does a delay in a loop save energy?
I've noticed most example snippets always have a delay in the loop even if it's not needed for proper execution of the program.
I can only assume this is added because people copy and paste without understanding what's going on but it got me…
Ryan Detzel
- 305
- 5
- 10
11
votes
2 answers
How does this code line detect if a serial interface is connected?
I am working with some code for remote temperature sensor nodes. They turn the debug interface on and off depending on if anything is conneced to the serial port or not.
The code is on Github here. Line 111 is the line of interest:
if (Serial) debug…
Cybergibbons
- 5,420
- 7
- 34
- 51
11
votes
3 answers
Could someone explain this weird looking code, used to setup timers?
While looking at sketches other people have written, I occasionally come across code that looks somewhat like this:
TCCR1A = 0;
TCCR1B = 0;
TCNT1 = 34286;
TCCR1B |= (1 << CS12);
TIMSK1 |= (1 << TOIE1);
All I know is that is has something to with…
The Guy with The Hat
- 5,292
- 7
- 30
- 51
11
votes
2 answers
Cheap Wired Multipoint Mesh Network
I'm looking to make a 15 x 15 grid of load sensors and RGB LEDs for an interactive dance floor. Each node will be driven by an arduino and the entire floor will be managed by a RaspberryPi. I'm trying to figure out the best way to have the nodes…
Jeremy Gillick
- 481
- 1
- 3
- 8
11
votes
2 answers
What is the purpose of the I/O pin capacitor on the AVR microcontroller?
What is the purpose of the capacitor on the I/O pins on the ATmega328 (I imagine it's on other AVR microcontrollers as well)? Is it to reduce noise from other parts of the microcontroller?
lemontwist
- 364
- 4
- 16
11
votes
3 answers
Major difference between DTR signal and RTS signal?
I actually had a doubt about what is the difference between the RTS signal and DTR signal ?
I already know this that the DTR signal is used to auto reset when we use Arduino and similar MCUs. Can anyone say what is the major difference between these…
Sagnik Pradhan
- 520
- 2
- 7
- 17
11
votes
10 answers
Different ways (and the fastest) to compute sines (and cosines) in Arduino
I am using an Arduino Uno board to compute the angles of my system (robotic arm). The angles are actually 10 bit values (0 to 1023) from the ADC, using the full range of the ADC. I am only going to be operating in the 1st quadrant (0 to 90 deg),…
Transistor Overlord
- 211
- 1
- 2
- 6
11
votes
3 answers
Why is my LCD 16*2 is not displaying any characters, although all the wiring is correct?
Recently I have linked up a typical 16*2 LCD (Liquid Crystal Display) display to my Arduino Uno and have linked all the pins up.
Here is my connection:(LCD pin first)
1=GND, 2=+5v, 4=11, 6=12, 11=5, 12=4, 12=3, 14=2, 15=backlight positive,…
Stratmoss
- 137
- 1
- 2
- 6
11
votes
4 answers
Powering Arduino Uno from 5V pin, what exactly is the voltage range/tolerance?
I want to bypass the onboard regulator and use the 5V pin to feed arduino with external, regulated source.
Everybody just keeps saying regulated 5V, but how precise does the regulation need to be exactly? Can you state a voltage range and what makes…
jediz
- 217
- 3
- 7
11
votes
1 answer
int VS uint8_t VS uint16_t
This question is quite clear. What are the differences between an int, an uint8_t, and an uint16_t. I know it has to do with bytes and memory but can someone clarify me a bit?
Things I want to know:
1- How much memory does each take.
2- When to use…
Dat Ha
- 2,943
- 6
- 24
- 46
11
votes
2 answers
How to pause Arduino for 1 millisecond through MATLAB?
I have been able to connect MATLAB to my Uno with this line of code: a = arduino('COM4'); through this package: Matlab support package for Arduino.
Right now, MATLAB is my main script that will synchronize all the components [like the Arduino].
I am…
Blundering Philosopher
- 213
- 1
- 4
- 9
11
votes
4 answers
Is the C++ STL fully supported on Arduino?
I don't yet own an Arduino board to run code on, and as the title says, I'm curious if the C++ STL is fully supported on Arduino and already part of the Arduino IDE. The STL is probably the most efficient, fully tested, and resource-minimal (which…
NonCreature0714
- 213
- 1
- 2
- 7
11
votes
2 answers
Can the Arduino interface with USB devices without the USB host shield?
I'm looking to connect various USB-devices to an Arduino Uno (specifically, a gamepad and a webcam, but I'm interested in the general case). Is this possible without using the USB host shield, since the Uno has a USB port and USB-to-serial…
Zenthirum
- 113
- 1
- 1
- 5
11
votes
1 answer
What does it mean in I2C, "NACK received"?
I am reading about I2C. On this site:
http://playground.arduino.cc/Main/WireLibraryDetailedReference#endTransmission
It says that endTransmission() can return one of the following status codes:
0: Successful send.
1: Send buffer too large for the…
Mads Skjern
- 1,145
- 3
- 13
- 23
11
votes
1 answer
I can't seem to receive data to the ArduinoStudio serial monitor on ubuntu 14.04
I'm using the Arduino Starter Kit so I have a Uno R3 and going through the examples I'm trying to read temperature data from my controller in Arduino Studio.
In essence my problem can be reduced down to
void setup() {
Serial.begin(9600);
}
void…
ivarni
- 211
- 1
- 6