Most Popular
1500 questions
19
votes
6 answers
Smaller and cheaper alternative to Arduino Uno for permanent projects
I have played a bit around with a Arduino Uno that came in a kit with a breadboard and components. Soon I would like to make some more permanent things.
I would prefer a smaller and cheaper unit than the Arduino Uno but that is almost as easy to use…
Andy
- 293
- 1
- 2
- 7
19
votes
5 answers
How can I declare an array of variable size (Globally)
I'd like to make three arrays of the same length. According to the documentation, Arrays must be defined as int myArray[10]; where 10 can be substituted for a known length (another integer), or filled with an array {2, 3, 5, 6, 7}.
However, when I…
user3.1415927
- 293
- 1
- 2
- 5
19
votes
2 answers
When should I use a transistor, mosfet, and when should I use a relay?
I am used to relays some, and they are useful, especially for large loads like a incandescent light bulb or other 120V AC device. However, it seems like overkill to use a relay for a bunch of LEDs linked together (parallel) that use 60 mA (too much…
Anonymous Penguin
- 6,285
- 10
- 32
- 62
19
votes
1 answer
How does serial communications work on the Arduino?
With reference to the Arduino Uno, Mega2560, Leonardo and similar boards:
How does serial communications work?
How fast is serial?
How do I connect between a sender and receiver?
Please note: This is intended as a reference question.
Nick Gammon
- 38,184
- 13
- 65
- 124
19
votes
5 answers
deprecated conversion from string constant to 'char*'
What does this error means?
I can't solve it in any way.
warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
Facorazza
- 431
- 2
- 6
- 17
18
votes
3 answers
How to prevent breaking my Arduino by mistake?
What is the best practice to make my Arduino circuit more robust against prototyping mistakes (like shorting pins)? I don't want the controller to release its blue magic smoke while experimenting with it, what precautions can I make while designing…
jippie
- 2,911
- 13
- 23
18
votes
2 answers
Should all unused analog input ports be tied to ground for accurate A2D measurements?
I am using the A0 port on my Arduino Uno to read the voltage output from an LM35 temperature sensor. I observed that the reading fluctuates a lot if I leave the remaining analog input ports A1 to A5 floating. Would floating analog inputs affect the…
Kavka
- 326
- 2
- 9
18
votes
3 answers
What is the best way to unit test my code without controller?
I want to unit test my Arduino code. Ideally, I want to execute and test my code without uploading it to the board. What tools or libraries can help me with this?
There is an Arduino emulator in development which could be useful, but it doesn't yet…
Hardik Thaker
- 1,407
- 2
- 12
- 15
18
votes
2 answers
What happens when I call exit() from my program?
In either of setup or loop, if I were to add an exit(0) call, where would control be passed to? What would the next state of the microcontroller be? Would it stop execution and power down?
I am using a revision 2 Arduino Uno.
asheeshr
- 3,837
- 3
- 25
- 61
18
votes
4 answers
How to get weight data from glass electronic bathroom scale sensors?
I am doing a small project with a bathroom scale but I run into some problems. I am using an Arduino Uno V3, HX711 module amp and a scale.
Scale:
HX711 amplifier:
I disassembled the scale to get to sensor wires and I am a bit confused. These…
silent_bob
- 193
- 1
- 2
- 7
17
votes
3 answers
Is there a color LCD display for an arduino?
I currently have a Mega2560 with the LCD4884 Shield. The Shield is good for putting out text and simple pixel images. But I am wondering if there is something that has a full range of colours that would work with the Arduino? The screen size would…
Ryan Erb
- 273
- 4
- 7
17
votes
6 answers
How can Arduino source code be tested automatically (continuous integration)?
I'd like manage my Arduino source code (projects and libraries) under source control with continuous testing. How can I automatically compile the code with continuous integration tools, to make sure each version compiles cleanly? In the best case…
Jakob
- 273
- 2
- 7
17
votes
7 answers
How do I know the sampling frequency?
I am beginning to get a bit confused about sampling rates and baudrates etc. I have this Arduino code:
#include
extern volatile unsigned long timer0_overflow_count;
float fanalog0;
int analog0;
unsigned long time;
byte…
hawkar
- 543
- 2
- 6
- 12
17
votes
2 answers
Difference between these two NodeMCU boards?
I recently received a NodeMCU (identical to the one shown in the first picture below) and originally, I was unable to connect it to my computer which eventually turned out to be driver issues; however, during my initial panic, I found that there…
Tom
- 329
- 1
- 3
- 10
17
votes
1 answer
How do interrupts work on the Arduino Uno and similar boards?
Please explain how interrupts work on the Arduino Uno and related boards using the ATmega328P processor. Boards such as the:
Uno
Mini
Nano
Pro Mini
Lilypad
In particular please discuss:
What to use interrupts for
How to write an Interrupt Service…
Nick Gammon
- 38,184
- 13
- 65
- 124