1

I want to connect a potentiometer on one Arduino (master side) and send the readings to another Arduino (client side) to run a servo motor. The communication between the two Arduinos should be via Wi-Fi using two ESP8266. Based on the changing values of potentiometer, the servo motor should run accordingly.

Is there any reference code? Or, if anybody has done this earlier, please share the link of your code.

  • Have you looked at the examples all libraries bundle with themselves? – Avamander Mar 26 '16 at 23:10
1

(Yes, I only have links in my answer. And they tend to rot. But in this case it shouldn't be too hard to find those tutorials, nor is the content very specific. I also somewhat feel there should be some help to this person before his question gets closed)

Try to focus on one thing at a time.

Follow the steps below, they should be self explanatory. If you run into trouble, you can always create a question based on that particular problem.

Doing so, you'll learn much more about programming/Arduino as by copying code (and having no idea how to). Sooner or later you'll run into the problem that people will not give you "ready to use code".

  1. Get an Arduino to read out a potentiometer. There are lots of tutorials about that.

https://www.arduino.cc/en/tutorial/potentiometer

  1. Get an Arduino to run a servomotor

https://www.arduino.cc/en/Tutorial/Sweep

  1. Combine these two.

https://www.arduino.cc/en/Tutorial/Knob

  1. Make a wired link between two arduino's

http://robotic-controls.com/learn/arduino/arduino-arduino-serial-communication https://www.arduino.cc/en/Tutorial/MasterWriter

  1. Make the potentiometer control the servo over the wired connection.

  2. Make a wireless link.

  3. Port the wired link to the wireless communication.

  • Thank you :) ,but i have already done all those (5 steps that you have said). I have already made the wired connection working. Now I want to port the wired link to wireless connection as you have said in your 7th Step. I know I should Make one wifi module as master and make it as an access point, and other should be client. But I couldnt find any code for transmitting continuously changing values via wifi with esp8266, and reading those continuously changing values from another esp8266 (peer to peer connection) to run the servo motor. So I need help with that :) – Syed Irfan Mar 26 '16 at 8:45
  • I believe you would be better of creating a new question, try to be detailed on how you set it up and which specific parts won't work. What happens and what should happen (: – Paul Mar 26 '16 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.