I’m guessing the problem’s somewhere in the CustomSerial function, but I’m not sure. It’s fustrating to be so close and yet not be able to figure it out. I know the RX works since it can receive data from the computer. I’ve tried connecting RX to TX directly, as well as via a resistor and/or via a transistor inverting the signal. however I cant even get the Arduino to read it’s own output. The servo pulls down on a null packet to transmit. Secondly, I cant seem to get RX to work at all.
Is there a simple way to reverse the logic levels on the Serial connection. Void dataSet(byte data1,byte data2,byte data3)ĭata=256-((data+data+data+data)%256) // Checksumįirst, I need to use a circuit to invert the outgoing data which isnt ideal. UCSR0B = 0x98 // Value to allow both RX and TX with servo
Void dataWrite(void) // Writes current data to the Servo via serialĭataSet(0圎9,0x01,0x01) //Sets Speed to minĭataSet(0x01,0x03,0x03) // Moves Servo to position 1ĭelay(20000) // Waits for servo to reposition, V.slow on min speedĭataSet(0圎9,0x01,0xFF) // Sets Servo to max speedĭataSet(0x01,0x06,0x06) // Moves servo to position 2 1 fully assembled Hitec Robonova-1 (near perfect condition not even scratches) Comes with original box, IR remote, data cable, instruction manual, assembly instructions, extra screws/brackets, etc. Void dataSet(byte data1,byte data2,byte data3) // Sets Serial data to be written Void CustomSerial(long ubrr) // Initialises the Serial Protocals on TX and RX with 2 stop, 8 bits #define MYUBRR FOSC/16/BAUD-1 // Time per Bit
#define BAUD 19200 // Serial Communication Speed Right, I’ve managed to get the Servo to respond to commands using the following code. Robonova 1 - Hitec Nov 8 Turbine - AMT Nederland Dic 40 Mese pag.