-->
Page 1 of 2

New to Esp8266---question

PostPosted: Sat Nov 14, 2015 10:44 pm
by Guitartexan
Hello all.

I am just getting started with esp8266 nodemcu.
I have enjoyed Arduino and nrf24l01, so I have some idea.
My question has to do with servo control.
How would one go about using an esp and potentiometer on one end to control a servo and esp on the other end? Are there any servo control code or project examples that do this with one esp talking to and controlling the other? I find several examples using a phone or PC/laptop.

Thanks for pointing me in the right direction!

Re: New to Esp8266---question

PostPosted: Tue Nov 17, 2015 7:56 pm
by willbird
Not sure how to accomplish the software end but I'd look towards using what is called a pulse generator.

eBay item number:181775994923

On the input end, and a stepper on the output end, on cnc machines there is usually a 3 position switch that makes each "click" either .0001, .001,or .01 inch movement per click. With a micro stepping stepper controller you could get 1/10 step and full steps per click at least. Stepper motor would be rotary output of course.

Bill

Re: New to Esp8266---question

PostPosted: Tue Nov 17, 2015 8:05 pm
by Mmiscool
The regular arduino servo commands work out of the box in the arduino environment.

https://www.arduino.cc/en/Reference/Servo

Re: New to Esp8266---question

PostPosted: Tue Nov 17, 2015 8:08 pm
by Mmiscool
The esp analog read function will return a value between 0 and 1023.

Code: Select allint bla;
bla = analogRead(A0);