Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Bluetooth/IHM_Bluetooth.h
- Revision:
- 2:1103f5d61035
- Child:
- 3:07109a6bb472
diff -r a9af73d5abd4 -r 1103f5d61035 Bluetooth/IHM_Bluetooth.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Bluetooth/IHM_Bluetooth.h Wed Mar 11 14:24:48 2020 +0000
@@ -0,0 +1,50 @@
+#ifndef BT_H
+#define BT_H
+
+#include "mbed.h"
+#include "math.h"
+
+#define STARTBYTE 240
+#define STOPBYTE 15
+
+#define KPBYTE 30
+#define KIBYTE 45
+#define KDBYTE 60
+#define SPCMDBYTE 75
+#define CAMXBYTE 100
+#define POSBYTE 130
+#define LMBYTE 150
+#define RMBYTE 165
+#define ERRORBYTE 180
+#define CERRBYTE 195
+#define SGRABYTE 210
+
+class IHM_Bluetooth
+{
+public:
+ IHM_Bluetooth();
+ void run(void);
+
+private:
+ // FONCTIONS
+ void transmitBlu (void);
+ void receptionBlu (void);
+ void formatTrameT(short reg, int val);
+ int get_val_pc(short reg);
+ void TrameCAM(int CAM1, int CAM2);
+ void TramePos(int left, int barc, int right);
+ void automate_Tx(void);
+
+ // VARIABLES
+ unsigned int blueRxBuffer[6]; // Buffer de réception de la liaison série bluetooth
+ unsigned char blueTxBuffer[6]; // Buffer de transmission de la liaison série bluetooth
+ unsigned int paramRx[4]; //0 KP 1 KI 2 KD 3 SPEED
+ short cb_lm;
+ short cb_rm;
+ short cb_err;
+ short cb_cerr;
+ short cb_speed;
+ Ticker timer;
+};
+
+#endif // BT_H