New answers tagged

0

I can see nothing wrong in your program except this: DDRB |= (1<<DDB7); // Output pin 5 OC3A This is setting pin PB7 as an output, whereas digital pin 5 (OC3A) is PE3.


0

Searching the net for smooth servo movement I found this entry one year ago. In the end I built a new library for this task called ServoEasing.


1

Another answer chrism didn't mention is to use an "absolute position rotary encoder". It's a device that outputs a bit pattern using "gray code" or "grays binary" that tells you the position of the shaft. The more bits in the encoder, the more precisely you can measure the position. The "gray code" bit pattern enables you to read the changing position ...


1

There are multiple ways to to this. The easiest and most commonly used way is to use a limit switch as home position sensor. At startup the device will first drive the motor in the direction of the limit switch, until the switch get's activated. Now the the absolute position on this axis is known and you can go on from there. (CNC machines and 3D printers ...


0

You have not use attach() function: s1.attach(pin_1); s2.attach(pin_2); See how to use servo motor


0

Do NOT use two loop() and setup() function. You can refer to a similar combination between Servo Motor code and Potentiometer code here.


Top 50 recent answers are included