Compare commits
6
Commits
1.0.0
...
8bb1ae6463
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bb1ae6463
|
||
|
|
931ffc0822
|
||
|
|
747a7a4766
|
||
|
|
9b65139b70
|
||
|
|
043459c336
|
||
|
|
4e003e8277 |
No files matched your search
+3
-3
@@ -1,3 +1,3 @@
|
||||
[submodule "lib/OTALibrary"]
|
||||
path = lib/OTALibrary
|
||||
url = git@git.emaker.limited:MicrocontrollerCD/OTALibrary.git
|
||||
[submodule "lib/BLEOTA"]
|
||||
path = lib/BLEOTA
|
||||
url = git@git.emaker.limited:MicrocontrollerCD/BLEOTA.git
|
||||
Submodule
+1
Submodule lib/BLEOTA added at 361424ded3.
Submodule lib/OTALibrary deleted from bf21b61803.
@@ -12,3 +12,4 @@
|
||||
platform = espressif32
|
||||
board = esp32-c3-devkitc-02
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
+19
-1
@@ -1,17 +1,35 @@
|
||||
#include <Arduino.h>
|
||||
#include <BLEOTA.h>
|
||||
#include <BLE2902.h>
|
||||
#include <BLEDevice.h>
|
||||
#include <BLEServer.h>
|
||||
|
||||
#include "pins.h"
|
||||
|
||||
#define BLINKRATE 500
|
||||
#define BLINKRATE 1000
|
||||
#define BLE_SERVER_NAME "Software Release"
|
||||
|
||||
unsigned long lastBlink = 0;
|
||||
|
||||
BLEServer* pServer = NULL;
|
||||
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
pinMode(LED, OUTPUT);
|
||||
|
||||
BLEDevice::init(BLE_SERVER_NAME);
|
||||
|
||||
pServer = BLEDevice::createServer();
|
||||
|
||||
BLEota.begin(pServer);
|
||||
delay(1000);
|
||||
Serial.println("Started!");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if ((millis() - lastBlink) > BLINKRATE) {
|
||||
Serial.println(digitalRead(LED));
|
||||
digitalWrite(LED, !digitalRead(LED));
|
||||
lastBlink= millis();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user