
This is due to the modification of function “Serial.peekn(n)”. Both of the modified files are included on my BitBucket page. I have not checked if these files have changed in any versions after 1.0.5.īoolean goodPacket //boolean value set true if good IBUS message detected The Arduino IDE version that must be used is version 1.0.5 – this is due to modifying the two core files mentioned above. Int EventID = 0 // Event number (for case select)īyte ibusByte // Byte array to store incoming messages. Max message length per BMW design should be 32, plus the source and length bytes, makes a total of 34. ibusByte array of 40 - 4 for (Source, length, destination, checksumByte) = 36Ĭonst int EN = 4 // HIGH enables Melexix TH3122 chipĬonst int senSta = 3 // SEN/STA output from Melexix TH3122 - Needs to be on pin 3 for interrupt 1 to work (on UNO/NANO - probably different on Mega)Ĭonst byte packetGap = 10 // Length of gap between messages we send Sticking to 40 for safety - don't want to overrun the array.īyte databytes // Byte array to store message data bytes. Debug - Used for sending debug messages to terminal window.

MySerial.begin(9600) // Set debug serial speed Serial.begin(9600, SERIAL_8E1) // Set hardware serial for 9600 baud, Even parity and one stop bit All these messages are either compared with incoming messages, or can be sent out onto the bus. Part 2: Solutions to Fix Prolific USB to Serial Driver Not Working.PinMode(senSta, INPUT) // Configure pin as inputĭigitalWrite (EN, HIGH) // write pin high to enable TH3122. If you are not able to connect your device to your PC using a USB to Serial adapter it may be that: #Using navcoder with usb to serial driver

#Using navcoder with usb to serial serial

#Using navcoder with usb to serial driver.#Using navcoder with usb to serial serial.
