mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-02 03:36:22 +02:00
* build CRC over settings, only if the CRC matches settings are applied * send command 0x80 (set time was wrong) * improved crc16 routine * added statistics for received commands and send statistics (channels are not correct for now!) * receive of commands 0x01, 0x02, 0x03, 0x81 and 0x84 working
25 lines
592 B
C++
25 lines
592 B
C++
#include "app.h"
|
|
|
|
app myApp;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
void setup() {
|
|
pinMode(RF24_IRQ_PIN, INPUT_PULLUP);
|
|
attachInterrupt(digitalPinToInterrupt(RF24_IRQ_PIN), handleIntr, FALLING);
|
|
|
|
// AP name, password, timeout
|
|
myApp.setup("ESP AHOY", "esp_8266", 15);
|
|
}
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
void loop() {
|
|
myApp.loop();
|
|
}
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
ICACHE_RAM_ATTR void handleIntr(void) {
|
|
myApp.handleIntr();
|
|
}
|
|
|