This a great example of how Bluetooth (BT) reads incoming chars. This program constantly check if a char has been sent over BT and then turns on or off a digital output on the K64F board. We used MIT App Inventor to download an app to a android phone. This app would connect to our HC06 BT module on the K64F. The app would send chars when certain buttons were pressed. The K64F would then receive them and take appropriate action. Our digital output would send signal to relays, that's why you see variables called relay1,2,3... The relays then allowed power to got to a power strip.
mbed.bld@0:2fb6b3ddfcbd, 2019-01-02 (annotated)
- Committer:
- santiiago210
- Date:
- Wed Jan 02 18:37:58 2019 +0000
- Revision:
- 0:2fb6b3ddfcbd
BASIC EXAMPLE TO RCEIVE DATA FROM BLUETOOTH MODULE HC-06; ; IF DATA RECEIVED IS EQUAL TO 'A' THE LED TURN ON. ; IF DATA RECEIVED IS EQUAL TO 'B' THE LED TURN OFF
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
santiiago210 | 0:2fb6b3ddfcbd | 1 | https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc |