controller - Control motor and servo over serial (Arduino) -


I would like to establish two arduino which will talk to each other on the serial. As a receiver, the other will act as the receiver. I already have two buttons which are working but I am having problems with the servo and the motor.

  val = analogRead (potPin1); If (val1! = Val) {val = map (val, 0, 1023, 5, 150); Serial. Printline ("3/2/10" / +); // Write steering val val1 = val;   

This is the code that is working, it prints letters continuously instead of letters, and only when the vessel changes, if possible, to control two with a joystick. But I thought it would be better to work differently than before. Remote Code = Receiver Code =

Thanks in advance.

What do you mean with "acting"? I'm not sure what you mean, but maybe you have to try the serial.printLN (analog value, DEC);

This prints the line as an ASCII-encoded decimal. For more information

Or maybe print () better your needs ().

In addition to this, there is a chance that you will overwrite your send buffer because your Baudet is very low (9600 baud / s), and every time you change an analog value in your main loop, then You may try sending more data than handling the connection.

I'm not sure that this will create a problem, but I suggest that to test your system consistently pressurize your joystick to ensure it :).

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -