i am using arduino uno and arduino mega and an mpu 6050. mpu 6050 is connected to the arduino uno which will process the sensor readings via fuzzy logic. the output will then be send to serial1 of the arduino mega. which will then send it to serial(0) which is connected to pc which would allow me to see if the output is correct. i am planning to use the output to control a servo.
problem is i was expecting to receive an output of 77 but the arduino mega is showing me 55… i really don’t know what happen… i tried connecting the arduino uno to the pc to see what is the output it was giving on the serial(0) and i can see that it was 77… can someone please tell me what did i do wrong and tell me if it is okay to directly use if angle = serial1.read(); in servo.write(angle); as a command to control a servo?thank you so much…
below is the arduino sketch that i made.
fis_header.h (638 Bytes)
sketch_jan11a.ino (46.5 KB)
sketch_jan15a.ino (342 Bytes)