Compare commits
1 Commits
931ffc0822
...
blink
| Author | SHA1 | Date | |
|---|---|---|---|
|
927531fa85
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "lib/BLEOTA"]
|
||||
path = lib/BLEOTA
|
||||
url = git@git.emaker.limited:MicrocontrollerCD/BLEOTA.git
|
||||
[submodule "lib/OTALibrary"]
|
||||
path = lib/OTALibrary
|
||||
url = git@git.emaker.limited:MicrocontrollerCD/OTALibrary.git
|
||||
|
||||
Submodule lib/BLEOTA deleted from 361424ded3
1
lib/OTALibrary
Submodule
1
lib/OTALibrary
Submodule
Submodule lib/OTALibrary added at bf21b61803
@@ -12,4 +12,3 @@
|
||||
platform = espressif32
|
||||
board = esp32-c3-devkitc-02
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
|
||||
23
src/main.cpp
23
src/main.cpp
@@ -1,35 +1,18 @@
|
||||
#include <Arduino.h>
|
||||
#include <BLEOTA.h>
|
||||
#include <BLE2902.h>
|
||||
#include <BLEDevice.h>
|
||||
#include <BLEServer.h>
|
||||
|
||||
#include "pins.h"
|
||||
|
||||
#define BLINKRATE 1000
|
||||
#define BLE_SERVER_NAME "Software Release"
|
||||
|
||||
long lastBlink = 0;
|
||||
|
||||
BLEServer* pServer = NULL;
|
||||
#define BLINKRATE 500
|
||||
|
||||
unsigned long lastBlink = 0;
|
||||
|
||||
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