Making a BMW E90 instrument cluster alive for demonstration purposes

Dependencies:   mbed

Revision:
3:4a4463380739
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SpeedMsg.h	Sat Mar 11 10:03:52 2017 +0000
@@ -0,0 +1,23 @@
+#ifndef SPEEDMSG_H
+#define SPEEDMSG_H
+
+#include "mbed.h"
+
+class SpeedMsg {
+
+    char counter1;      // Increase by 144 (0x90)
+    char counter2;      // Increase by: 1 2 1 2 1 2 2 1 2 1 2 1 2 1 2 2 (then repeated)
+
+    char c2inc[16];
+    char c2incp;
+
+    uint8_t spb[6];
+
+    public:
+        SpeedMsg();
+        
+        void setSpeed(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5);
+        bool sendMessage(CAN *can);
+};
+
+#endif
\ No newline at end of file