aboutsummaryrefslogtreecommitdiff
path: root/Lesson 2 Bluetooth Car/bluetooth_blink/bluetooth_blink.ino
diff options
context:
space:
mode:
Diffstat (limited to 'Lesson 2 Bluetooth Car/bluetooth_blink/bluetooth_blink.ino')
-rwxr-xr-xLesson 2 Bluetooth Car/bluetooth_blink/bluetooth_blink.ino22
1 files changed, 0 insertions, 22 deletions
diff --git a/Lesson 2 Bluetooth Car/bluetooth_blink/bluetooth_blink.ino b/Lesson 2 Bluetooth Car/bluetooth_blink/bluetooth_blink.ino
deleted file mode 100755
index 5e357c1..0000000
--- a/Lesson 2 Bluetooth Car/bluetooth_blink/bluetooth_blink.ino
+++ /dev/null
@@ -1,22 +0,0 @@
-//www.elegoo.com
-//2016.09.12
-
-int LED=13;//Define 13 pin for LED
-volatile int state = LOW;//The initial state of the function is defined as a low level
-char getstr; //Defines a function that receives the Bluetooth character
-void setup() {
- pinMode(LED, OUTPUT);
-Serial.begin(9600);
-}
-/*Control LED sub function*/
-void stateChange()
-{
- state = !state;
- digitalWrite(LED, state);
-}
-void loop() {
- getstr=Serial.read();//The Bluetooth serial port to receive the data in the function
- if(getstr=='A'){
- stateChange();
- }
-}