-
Notifications
You must be signed in to change notification settings - Fork 0
/
BluetoothSend.ino
50 lines (26 loc) · 933 Bytes
/
BluetoothSend.ino
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
42
43
44
45
46
47
48
49
50
// WOEK BEST With BLUETOOTH GRAPH APPLICATION
void Sensors_BluetoothSend(){
SERIAL_BLUETOOTH.print("E");
SERIAL_BLUETOOTH.print(readADC(1));
SERIAL_BLUETOOTH.print(",");
SERIAL_BLUETOOTH.print(readADC(0));
SERIAL_BLUETOOTH.print(",");
SERIAL_BLUETOOTH.print((currentSpeed));
SERIAL_BLUETOOTH.print(",");
SERIAL_BLUETOOTH.print(analogRead(ANALOG_ONE_PIN));
SERIAL_BLUETOOTH.print(",");
SERIAL_BLUETOOTH.print(analogRead(ANALOG_TWO_PIN));
SERIAL_BLUETOOTH.print("\n");
}
void AnalogAccelero_BluetoothSend(){
int coordX = analogRead(ACCELERO_X_PIN) ;
int coordY = analogRead(ACCELERO_Y_PIN) ;
int coordZ = analogRead(ACCELERO_Z_PIN) ;
SERIAL_BLUETOOTH.print("E");
SERIAL_BLUETOOTH.print(coordX);
SERIAL_BLUETOOTH.print(",");
SERIAL_BLUETOOTH.print(coordY);
SERIAL_BLUETOOTH.print(",");
SERIAL_BLUETOOTH.print(coordZ);
SERIAL_BLUETOOTH.print("\n");
}