hackathon 6th arduino藍色蜘蛛網
TRANSCRIPT
Agenda
WORKSHOP1:Arduino 入門:HELLO WORD
WORKSHOP2:HC-05進入AT模式,查詢藍芽位址
WORKSHOP3:APP INVENTOR與HC-05連線,手機遙控小物
WORKSHOP4:HC-05與HC-05資料對傳,藍芽進階研究
Arduino Program Flow
Global Variables
Setup
Loop
Run once at beginning,set pings
Declare variables at top
Run repeatedtedly,after setup()
WORKSHOP3
#include <SoftwareSerial.h>SoftwareSerial BTSerial(10, 11); // RX | TXvoid setup(){
Serial.begin(9600);BTSerial.begin(9600);
}void loop(){
if (BTSerial.available())Serial.write(BTSerial.read());
and send to HC-05if (Serial.available())
BTSerial.write(Serial.read());}