Go Down

Topic: Servo control (Read 1 time) previous topic - next topic

PeterH

Change the int to a byte, but otherwise yes:

Code: [Select]

volatile byte x = 0;


Does it print the correct values? Does the servo correctly move to the corresponding positions?
I only provide help via the forum - please do not contact me for private consultancy.

dattasaurabh82

Thanks PETER for your constant support. Power cut is going on here. Also tired of all the discussions through-out the day. will let you know tomorrow.
Should I also keep the out-put value from the arduino-one as "byte" or "int"? And the servo.Write() & serial.Println() should be in void loop() or event-handler loop?

dattasaurabh82

It works. But the response is pretty slow unlike the serial communication.  :~

PeterH

What do you mean by "pretty slow"?
I only provide help via the forum - please do not contact me for private consultancy.

dattasaurabh82

It felt like the buffer was not completely cleared & the motor was turning against it's will . Some times it tries to rotate completely, but couldn't & the slow response is due to the delay's I used on both the boards.

Also can I communicate between ATtiny85/45 & Arduino UNo using I2C. Separate I2C  lines are not present in ATtinys. So we might need an USI-I2C converter sort of thing .
I'm asking this because I want to replace my Arduino-2 with n ATtiny. Is that possible?

Go Up