add lib PCA9685 locally, because of warnings
This commit is contained in:
+18
-9
@@ -1,8 +1,10 @@
|
||||
#include <Arduino.h>
|
||||
#include <Wire.h>
|
||||
|
||||
#include "PCA9685.h"
|
||||
#ifdef WITH_GDB_STUB
|
||||
#include <GDBStub.h>
|
||||
#endif
|
||||
|
||||
// #include <Wire.h>
|
||||
#include "PCA9685.h"
|
||||
|
||||
#define ESP12_LED 2
|
||||
#define NODEMCU_LED 16
|
||||
@@ -44,9 +46,9 @@ void timerCallback(void *pArg)
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <WiFiClient.h>
|
||||
|
||||
#include "index.html.gz.h"
|
||||
#include "style.css.gz.h"
|
||||
#include "favicon.png.gz.h"
|
||||
// #include "index.html.gz.h"
|
||||
// #include "style.css.gz.h"
|
||||
// #include "favicon.png.gz.h"
|
||||
// images are possible
|
||||
// maybe check out FS <- SPIFFS
|
||||
|
||||
@@ -67,18 +69,21 @@ PCA9685 pwmController;
|
||||
void handleRootGz() {
|
||||
const char* dataType = "text/html";
|
||||
server.sendHeader(F("Content-Encoding"), F("gzip"));
|
||||
server.send(200, dataType, (const char*)index_html_gz, index_html_gz_len);
|
||||
server.send(404, dataType, "debug");
|
||||
// server.send(200, dataType, (const char*)index_html_gz, index_html_gz_len);
|
||||
}
|
||||
|
||||
void handleCssGz() {
|
||||
const char* dataType = "text/css";
|
||||
server.sendHeader(F("Content-Encoding"), F("gzip"));
|
||||
server.send(200, dataType, (const char*)style_css_gz, style_css_gz_len);
|
||||
server.send(404, dataType, "debug");
|
||||
// server.send(200, dataType, (const char*)style_css_gz, style_css_gz_len);
|
||||
}
|
||||
void handleFaviconGz() {
|
||||
const char* dataType = "image/png";
|
||||
server.sendHeader(F("Content-Encoding"), F("gzip"));
|
||||
server.send(200, dataType, (const char*)favicon_png_gz, favicon_png_gz_len);
|
||||
server.send(404, dataType, "debug");
|
||||
// server.send(200, dataType, (const char*)favicon_png_gz, favicon_png_gz_len);
|
||||
}
|
||||
|
||||
void handleNotFound() {
|
||||
@@ -179,8 +184,12 @@ void setup_pwm_pca9685() {
|
||||
}
|
||||
|
||||
void setup() {
|
||||
#ifdef WITH_GDB_STUB
|
||||
Serial.begin(460800);
|
||||
gdbstub_init();
|
||||
#else
|
||||
Serial.begin(115200);
|
||||
#endif
|
||||
|
||||
Serial.println(F("Booting ...."));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user