Hello, I am attempting to make an RC car using two arduino unos, a standard analog joysyick, two HC-12 wireless serial modules (HC-12), a servo(for steering), and a PWM motor speed controller. I plan on having the x and y values from the joystick mapped so then both values can be sent one after another to the other arduino. The HC-12 modules are both connected to pins 2 and 3 (RX, TX) so the SoftwareSerial library can be used. I am having most of my troubles mapping the joystick values for the servo(0-179 degrees) and the speed controller(0 or 0% duty cycle-255 or 100% duty cycle) and also reading the values on the receiving arduino and writing those values to there respective pins.
xtfishburnx: and the speed controller(0 or 0% duty cycle-255 or 100% duty cycle)
From personal experience, you can use the Servo.h library to drive ESC modules using 0 as no throttle to 180 as full throttle.
xtfishburnx: mapping the joystick values for the servo(0-179 degrees)
You know you can map all the way to 180 degrees for a servo, right?
Lastly, take a look at this: link
Hello, I am using two HC-12 wireless serial modules(HC-12) to send data to another arduino. I have them set up so that one sends a number everytime you push a button. I am having trouble sending words or just a single letter. The letter shows up as two or more numbers in the serial monitor on the receiving arduino. ex. "54 123 45" I am using the Serial.write and Serial.println functions.
Don't double post
I plan on having the x and y values from the joystick mapped so then both values can be sent one after another to the other arduino.
It will be much easier to manage the system if you send all the values every time, even if they have not changed.
I am not familiar with the details of the HC12 but if it just takes data similar to what you would use with the Serial Monitor then send something like <sss, ddd> where sss is the speed value and ddd is the direction value. If you always send the data like that then the receiving Arduino will know that the first value is the speed etc.
Have a look at the 3rd example and the parse example in Serial Input Basics
Please stop cross-posting.
If you posted code, in code tags of course, you would get better help.