Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <WiFi.h>
- #include "BluetoothSerial.h"
- BluetoothSerial SerialBT;
- const char* ssid = "wifissd"; // wifi SSD
- const char* password = "password"; // wifi password
- void setup () {
- SerialBT.begin("Clock");
- WiFi.begin(ssid, password);
- while (WiFi.status() != WL_CONNECTED) {
- delay(500);
- Serial.print('.');
- }
- }
- void loop () {
- if (SerialBT.available())
- {
- char received = SerialBT.read();
- btBuffer += received;
- if (received == '|')
- {
- processCommand();
- btBuffer = "";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment