Gentleman,
I would like to communicate two Arduinos via RS485. My question is how can I do to drive a motor gradually through a pot and the pot will be an Arduino and fire the engine in another Arduino in a distance of 100m.
Could you help me?
Gentleman,
I would like to communicate two Arduinos via RS485. My question is how can I do to drive a motor gradually through a pot and the pot will be an Arduino and fire the engine in another Arduino in a distance of 100m.
Could you help me?
Is it the code to use RS485 or the code to do the control that you have a problem with ?
A Google search for arduino rs485 or a search for rs485 in this forum returns quite a few hits.
The motor control aspect of the project sounds easy. Read the pot with an analogue input on Arduino 1 and map() it down to the 0 to 255 range (or just divide it by 4) then send the resulting byte to Arduino 2. On Arduino 2 read the byte and use a PWM output to drive the motor using the incoming byte as the PWM parameter.
Thanks for your help UKHeliBob.
My problem is in making the code for sending the pot to the drive motor. Being the pot in triggering an Arduino sending this command via serial to another Arduino to drive the motor.
See the picture.
How far have you got ?
Can you read the value from the pot, convert it to a byte and print it on the Serial monitor of the first Arduino ?
Have you looked at the analogue example programs in the IDE ? AnalogInOutSerial would seem to be particularly relevant.