All Questions

5
votes
1answer
598 views

Can a stepper motor be controlled directly from an Arduino?

I'm planning to build a simple XY plotter, and have been looking at the possibility of using a pair of small 5V 4-phase steppers to provide the movement. In my research, I've often seen stepper driver ...
5
votes
1answer
344 views

Can I link another device to the Uno's clock?

I'm trying to use an unusual 16x2 LCD display with my Uno. As far as I know, it's an EA-X16027AR. It doesn't seem to be compatible with the HD44780 driver, which is typically used for Arduino LCD's. ...
1
vote
0answers
411 views

Why can't I use Jeelib Sleepy on the Teensy 2 along with Serial

I have been using the Jeelib Sleepy functionality for several years now to achieve low power states on the Arduino ATmega328/1280/2560 boards, specifically the LoseSomeTime functionality. I want to ...
6
votes
2answers
951 views

How can I adapt the DallasTemperature library to accept another 1-Wire class?

A commonly used library is the DallasTemperature library, used to access DS18B20 sensors on a 1-Wire bus. When creating a DallasTemperature object you pass a reference to a OneWire object. OneWire can ...
6
votes
1answer
2k views

Why do I need to include libraries used in other libraries?

I have a simple library which uses another library. Here is the header: #ifndef __DERIVEDCLASS_H__ #define __DERIVEDCLASS_H__ #include <HardwareSerial.h> class DerivedClass { private: ...
9
votes
2answers
3k views

Why is int only 2 bytes?

When using C/C++ on other platforms, the int type is typically 4 bytes (or potentially more). However, on Arduino, it's only 2 bytes. Why is it different? Does it affect performance if I always use ...
8
votes
2answers
8k views

How precise is the timing of pulseIn()?

I've been using the pulseIn() function for processing PWM-based binary data encoding. It works well for distinguishing pulses which are significantly different lengths, e.g. 500us vs. 1500us. That ...
21
votes
3answers
5k views

Can a function be called automatically when an input changes?

Currently, my sketch is checking an input pin every time round the main loop. If it detects a change, it calls a custom function to respond to it. Here's the code (trimmed down to the essentials): ...
1
vote
1answer
263 views

Are there different revisions of Arduino Uno SMD?

I know there are different revisions of the Arduino Uno itself, but are there any revisions of the SMD? If they are is SMD R2 identical to through-hole R2? I have a board marked R2 SMD and I am ...
7
votes
1answer
4k views

What are the SVG pins for on the SainSmart Uno clone?

I bought a SainSmart clone board which is compatible with the Arduino Uno R3. Alongside each of the standard IO pins, there is a row of 3 additional pins (male). They are arranged in columns, marked S,...
35
votes
4answers
50k views

How high of a baud rate can I go (without errors)?

The standard is 9600 baud. That's just the standard. Using a Arduino Uno SMD R2, what is the highest practical baud rate I can achieve? Bonus points for the audacious: How would you go about creating ...
21
votes
2answers
7k views

What's the difference between a clone and a counterfeit Arduino?

I've been hearing a lot about clones and counterfeits. What are the differences between the two?
5
votes
3answers
2k views

Serial sensors and the Yun

I am involved in a project that is going to measure PH and chlorine in a swimming pool. The plan is to use a Arduino Yun. The sensors we are going to use are connected using serial. Since we may be ...
52
votes
7answers
108k views

How can I create multiple running threads?

Is there a way I can have multiple parts of the program running together without doing multiple things in the same code block? One thread waiting for an external device while also blinking a LED in ...
25
votes
7answers
23k views

How can I get a unique ID for all my Arduino boards?

Once you have uploaded a sketch to one of your Arduino boards, it is hard to know exactly what source code led to that sketch. Indeed, you may change the source code of your sketch on your PC without ...
8
votes
2answers
1k views

What will happen when I use an invalid pin number?

Related to: What happens if there is a runtime error? This question is similar to the one above, however this is an alternate situation: int pin = 999; pinMode(pin, OUTPUT); digitalWrite(pin, HIGH)...
8
votes
2answers
13k views

When should I use a transistor, mosfet, and when should I use a relay? [closed]

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 ...
2
votes
1answer
2k views

Using the Waspmote Sensor Board

Spanish company Libelium makes this pretty impressive sensor board: http://www.libelium.com/products/waspmote/sensors/ for their Waspmote series of boards. These are not meant for Arduino ...
10
votes
3answers
6k views

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 ...
9
votes
5answers
925 views

How do I write an Arduino sketch and an Android application to talk to each other over a standard USB cable?

How do I write an Arduino sketch and an Android application to talk to each other over a standard USB cable?
4
votes
4answers
912 views

Infrared TV Remote to Arduino

On the hardware side of things, what is involved in making the Arduino receive signals from a TV Remote? What kind of infrared receiver is needed? Do TV remotes use some kind of channels, encoding, or ...
13
votes
4answers
17k views

Are there any signal smoothing libraries for Arduino?

I am working on a mobile robot controlled via a wireless 2.4 GHz link.The receiver is connected to the Arduino Uno which serves onboard as the main controller. The most critical (and main) input ...
8
votes
4answers
14k views

Arduino Time Clock Accuracy

I'm currently trying to create an Arduino time clock by using the PJRC Time library (http://www.pjrc.com/teensy/td_libs_Time.html). I know that since most of the Arduino boards are running with a ...
1
vote
1answer
1k views

How to power Arduino externally for long term? [closed]

For a robotic project, I need to keep an Arduino powered up for a long time in an outdoor environment. What can I use to power the board? If battery is the only solution, can the device tell me ...
5
votes
2answers
271 views

Controlling mains (230 V) supply up to 5/10 amps using Arduino

I am looking for a simple, low cost solution to control on/off of mains supply to certain equipment. The control will be done using one of the output pin of Arduino Uno. The input trigger and how to ...
1
vote
2answers
2k views

Are there any good and maintained libraries for using DS2482 I2C to 1-Wire bridge?

The DS2482-100 and DS2482-800 are I2C to 1-Wire bridges which are useful for driving complex 1-Wire networks. These are natively supported by a number of packages in Linux so you can interface easily ...
19
votes
3answers
18k views

What is the real lifetime of EEPROM?

ATMEL says the cell lifetime of an EEPROM cell is about 100,000 write cycle/ cell. Is this actually how the EEPROM performs in the wild? If I do not change the value of a cell, does this stress the ...
7
votes
3answers
5k views

Is it possible to program an Arduino Pro Mini using an Arduino Uno R3?

I've recently received an Arduino Pro Mini as a gift, and I don't have an external USB programmer to program the Pro Mini. However, I do own an Arduino Uno R3, and I think it would be possible because ...
26
votes
4answers
65k views

What can I do if I run out of Flash memory or SRAM?

According to the Arduino documentation, the ATmega328 has 32KB of Flash memory for the bootloader + uploaded sketch, and only 2KB SRAM for runtime data. The ATmega2560 has quite a bit more, totalling ...
11
votes
2answers
4k views

I got a missignatured ATmega328-PU. How can I fix that?

Sometime in the past, I was burning bootloaders on a fresh batch of four ATmega328-PU using the Arduino IDE (notice there's no P after 328 - it's the slightly cheaper non-picopower version of the MCU, ...
17
votes
2answers
21k views

Why do some pins have a different PWM frequency?

According to the Arduino reference for analogWrite(), the PWM frequency on most pins is ~490 Hz. However, it's ~980 Hz for pins 5 and 6 on the Uno, and for pins 3 and 11 on the Leonardo. Why are ...
23
votes
3answers
4k views

What happens to the Arduino if you don't use a resistor with an LED?

Making a blinking light seems to be one of the most common beginner projects with Arduino. A typical approach is to connect an LED + resistor (in series) to an IO pin, and connect the other end to ...
12
votes
6answers
13k views

Sending Large Amounts of Serial Data

So in the fields of robotics sometimes you need multiple boards and or computers linked together to share information or save statistical data. Currently I need to send a few different variables over ...
0
votes
2answers
5k views

When to use different variable types? [closed]

There are several different types in the Arduino programming language. They each have different applications that can use up the limited RAM in the Arduino. When should i use each?
9
votes
4answers
7k views

How to really shrink a sketch

I want to make a sketch that is as small as possible, for test purposes. The problem is, when i compile the BareMinimum sketch (with an empty setup and loop), i get 466 bytes for the Uno and a ...
15
votes
6answers
9k views

What happens if there is a runtime error?

What happens if there is a runtime error in a program? Will execution of the program just stop? Is there some way I get get the Arduino to tell me what the error is?
16
votes
2answers
22k views

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 ...
12
votes
1answer
4k views

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() { ...
13
votes
5answers
4k views

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 ...
40
votes
5answers
96k views

Is there any way to download a sketch from an Arduino?

I made a sketch, but then I lost it. However, I uploaded it to the Arduino before losing it. Is there any way I can get it back?
42
votes
10answers
161k views

How do I print multiple variables in a string?

Say I have some variables that I want to print out to the terminal, what's the easiest way to print them in a string? Currently I do something like this: Serial.print("Var 1:");Serial.println(var1); ...
6
votes
4answers
1k views

Is there a semi-permanent way to attach wires to the Nano?

At least for prototyping, is there a semi-permanent way to attach wires to the Nano posts? And yes, usually the Nano is hanging in free space by its wires (yes I know, quick and dirty, should be ...
18
votes
2answers
12k views

Why can't I declare a class in another tab in Arduino IDE?

I wanted to move some of my code out into a second tab in the Arduino IDE, to keep things better organised. At first, I only tried moving a function, and it seemed to work fine. I could call the ...
11
votes
3answers
27k views

How do I use I2C devices with Arduino?

I have a few useful I2C components, such as a 16-bit port expander (MCP23017), which I'd like to use in various projects. What do I need to do to make these work with Arduino? Will it work with any ...
5
votes
1answer
1k views

Connecting breakout board to Arduino with UART

I'm using a DigiX (Arduino Due based 3.3V) board to connect to a GPRS/GSM SIM908 breakout board. The SIM908 EVB board has the following pins on its RS232: I've got all three UART TX lines hooked up ...
16
votes
3answers
110k views

How to check my Arduino board is working or dead?

When you have a board in your hand but you don't know is it working or not, how to verify if it's working or dead?
10
votes
2answers
2k views

What I should be aware before I touch my Arduino?

Before you start to mess with a computer there are basic guidelines to be aware of, such as turn the power off and watch out for static electricity. What guidelines should I be aware of when I work ...
9
votes
6answers
31k views

Code for one-time execution in Arduino

Question: Where do I put code if I want it to execute only once per Arduino startup? Background: I tend to use my Arduino to perform tasks that should be executed once per power cycle. (For example, ...
13
votes
4answers
4k views

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?
6
votes
4answers
20k views

How can I communicate from Arduino to MATLAB

I want to use sensors on an Arduino to control values in a MATLAB program. What are my options for communicating? I've used Processing to receive data sent via the serial cable, and that strategy has ...

15 30 50 per page