Hot answers tagged

20 votes

How do I extract code from an arduino?

The short answer: You don't. With enough know-how, you could probably extract the executable binary from the Arduino, but the source code is not installed on the device. You would need to run a ...
user avatar
  • 5,499
16 votes
Accepted

Is Arduino stable enough to use it for a door lock?

I'm not sure if the platform is stable enough to use it for something like this. Absolutely it is. As I describe in my post about an RFID door lock I use a Uno (and some additional parts) to unlock ...
user avatar
  • 35k
14 votes
Accepted

What is commonly done to stop a servo after reaching desired position?

You do not "stop" a servo. A servo is always running. In a general sense, the servo is a control loop that takes as input a position target and applies force to hold at the requested target. If you ...
user avatar
  • 1,355
11 votes

Is Arduino stable enough to use it for a door lock?

If you want to use an Arduino in this sort of environment, there are a few things to watch out for: Heat (usually from sunlight striking the enclosure). This could be relevant for your project, ...
user avatar
11 votes

How do I extract code from an arduino?

You never can get the actual code back ... by reading the flash you might be able to get the executable/runtime code, but this doesn't look at all similar as your code, although it's functionally the ...
user avatar
10 votes
Accepted

What does the term "9g" in servo's rating mean?

According to Flite Test web site, the 9g reference is the weight without the wire lead. They measured one model at 8 grams rounded down. I suspect the weight also ignores the horn as well as the wire. ...
user avatar
9 votes

What is commonly done to stop a servo after reaching desired position?

A normal servo doesn't have a "go" function, it only has positional control. That is, whether you run servo.write(90) forever or once, the servo will go to 90 and continue to actively keep that ...
user avatar
  • 4,299
9 votes

How do I extract code from an arduino?

You read the contents of flash and save it to a file. It can then be re-flashed if your need is not to edit, but duplicate. This reads all flash, including the bootloader, and also PROGMEM data. Use ...
user avatar
  • 191
7 votes

Is Arduino stable enough to use it for a door lock?

If you can guarantee that your hardware and software skills are impeccable then you can certainly trust the MCU on the board. After all, the ATMega chips aren't toys, even though many people around ...
user avatar
  • 101k
7 votes
Accepted

How long does it take for a servo to change rotation?

Normal servos don't provide any feedback. Their speed depends on the servo's specs and the load. You could measure the time it takes to rotate a certain angle and use that to calculate the time, then ...
user avatar
  • 1,645
7 votes
Accepted

Implement two processes at the same time

Think of an Arduino as a circus clown spinning plates. It has to spend very little time on any one plate, and then it can keep a lot of plates spinning, moving quickly from one to the next. That's how ...
user avatar
  • 5,499
6 votes

What is commonly done to stop a servo after reaching desired position?

myservo.detach(); is what you are looking for. Moving it to a location than detaching. This is good when you want to use it to control a servo and not have it continue to take power like when using a ...
user avatar
6 votes
Accepted

Why can't most servos rotate more than around 180°

Fundamentally, because the systems they were designed for convert rotary motion to linear, typically with a range substantially less than 180 degrees (probably more like 120 degrees). Next, because ...
user avatar
6 votes

What power supply should I use?

I am wondering about what voltage my external power will need to be to control all of them at 6v Well that would be 6V then wouldn't it? You're asking the wrong question. The question you should be ...
user avatar
  • 101k
6 votes

error: stray '\' in program with servo

You have bad Unicode characters in your code. All your semicolons are something completely different and need replacing with real semicolons.
user avatar
  • 101k
6 votes
Accepted

Arduino: Reading DS18B20 interferes with servo

Arduino's Servo library on AVR uses interrupts; if interrupts are disabled for any amount of time, the servos will twitch. 1-Wire protocol (used by DS18B20) needs to disable interrupts for the ...
user avatar
  • 176
5 votes
Accepted

How can the Arduino Uno support up to 12 servos if it only has 6 digital PWM pins?

Although I haven't looked at the source myself, in these types of situations they usually use interrupt timer 1, which in PWM mode would have been associated with pins 9 and 10. This would explain why ...
user avatar
5 votes

Arduino starter kit servo is shaking

If the problem is due to jittery pot readings, you may want to smooth the potval data sequence by code like the following, where rawreading stands for what you just read from the potentiometer's input ...
user avatar
5 votes
Accepted

How to control 2 servos at same time in sync?

If you have two RC servos that are always required to move together you can simply connect both control inputs to a single output.
user avatar
5 votes

How to make servo rotate for angle bigger than 180°

No. The continuous rotation servo rotates continuously and you can not control where to stop. You can control the rotation direction and the speed at a little. What you need is either a special 270 ...
user avatar
  • 771
5 votes
Accepted

Burning servos like crazy, what am I doing wrong?

Some servos are actually not able to do full 0..180 rotation - or to rephrase it better, the standard 0.5ms and 1.5ms pulse will force them to a position which can not be reached. Therefore the motor ...
user avatar
  • 771
5 votes
Accepted

Is it possible to move a servo without knowing it's current position?

A normal servo is an absolute positioning device. The position of the servo is directly proportional to the length in time of the sync pulse. This means if you tell the servo to be in a given ...
user avatar
  • 6,441
5 votes

Smooth servo control library

Infortunately, I did not find any library but I found that the method shown below could work quite well for small projects. By adding a small delay, it helps the servo run a little smoother. It is not ...
user avatar
  • 2,793
5 votes
Accepted

Can I connect a servo directly to arduino uno without a transistor?

The Arduino's GPIO pins can drive the signal of most model servos directly, without any extra transistors. Driving a model servo signal input is not the main problem with driving servos from an ...
user avatar
  • 900
5 votes
Accepted

Why is the loop() stopping?

Just a small mistake! Not much big of a deal :D In the move function void move(int from, int to) { // initiate the move to the new angle servoMain.write(to); // wait for the movement to ...
user avatar
  • 426
5 votes
Accepted

Serial.parseInt value always goes back to 0

This code will work IF you set the Serial Monitor to "No Line Ending" (OSX 10.6.8. IDE Version 1.0.6.2). parseInt() doesn't like the NL + CR chars. unsigned int val; void setup(){ Serial.begin(...
user avatar
  • 2,471
5 votes

declared variable inside void setup is forgotten in void loop

Yes, that is how C and C++ (and most other C-like languages) work. Variables have "scope". Any variable define inside a pair of curly braces (between a { and a }) is only visible inside those braces. ...
user avatar
  • 5,499
4 votes
Accepted

Arduino starter kit servo is shaking

I like this method the best (personal preference) for smoothing signals: //In setup int bufferedVal = analogRead(A0); int unbufferedVal = analogRead(A0); #define _TOLERANCE_ 5 //The loop ...
user avatar
4 votes

Unusual LCD behaviour

Insufficient decoupling. Put a 100nF cap on the supply lines at the LCD and a 100uF cap on the supply lines at the servo.
user avatar
4 votes

How do voltage and resistance work for two 5v servos when using an external 12v power supply?

Addition to Ignacio. Explanation from real life. Gregir, look at your home devices like TV, micro wave, fridge and so on. They all need 220-230 V AC and you can plug all them to one socket. As ...
user avatar
  • 538

Only top scored, non community-wiki answers of a minimum length are eligible