-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbluetooth.h
More file actions
41 lines (36 loc) · 1.23 KB
/
bluetooth.h
File metadata and controls
41 lines (36 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//----------------------------------------------------------------------------------------------------------------------
// Projet VOR-013 Vor Marley the drawing Robots
// Major Lee
// CC-0
// Juillet 2016
//----------------------------------------------------------------------------------------------------------------------
// entete classe chargee des comm bluetooth
//----------------------------------------------------------------------------------------------------------------------
#ifndef V13BT_H
#define V13BT_H
#define DELAYSEND_STATUS 5000 //ms
#define DELAYTIMEOUTCONNEXION 20 //en seconde
#include <Arduino.h>
#include <SoftwareSerial.h>
#include "debugSerialPort.h"
class V13BT{
private:
//SoftwareSerial *_bluetoothSerial; // RX, TX
SoftwareSerial _bluetoothSerial; // RX, TX
boolean _flagRec;
String _bufRec;
long _delaySendStatus;
long _prevDelaySendStatus;
char _prevChar;
long _trameNum;
boolean _flagBTconnecte;
long _timeoutConnexion;
public:
V13BT();
void begin(int speed);
void update( String trameEtat ); //update : emet et recoit
boolean getFlagRec();
boolean getRec(String& buffRecu ); //si chaine recu alors vrai
void echoTrame(String trame);
};
#endif