
All these messages are either compared with incoming messages, or can be sent out onto the bus. Debug - Used for sending debug messages to terminal window. 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. Max message length per BMW design should be 32, plus the source and length bytes, makes a total of 34. Int EventID = 0 // Event number (for case select)īyte ibusByte // Byte array to store incoming messages. 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. This is due to the modification of function “Serial.peekn(n)”. Both of the modified files are included on my BitBucket page. “C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino” The files are “HardwareSerial.cpp” and “HardwareSerial.h”, located in the following directory: There are two slight modifications that need to be made to the Arduino core files in order for this branch of code to work properly. Most of the code is fairly well commented, but I will provide a general description here anyway. Like I mentioned earlier, the coding was mostly done by ian332isport, and only slightly modified for projects’ my purposes.

I suggest looking at the latest versions (which do not require core modifications and can use the latest Arduino IDE), available: here.Īll of the Arduino I/K-Bus code is available on my BitBucket page, as well as Google Drive (embedded below). This is an older version of the code, and requires and outdated Arduino IDE, as well as some modifications to the IDE core files.

The examples below are from version 0.0.1-alpha.

*** Project: Arduino & BMW K/I-Bus Interface ***
