YoLo
This commit is contained in:
parent
bf41a23cf0
commit
c4eafa227a
4 changed files with 12 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@
|
||||||
.vscode/c_cpp_properties.json
|
.vscode/c_cpp_properties.json
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
.vscode/ipch
|
.vscode/ipch
|
||||||
|
include/config.h
|
8
include/config.h.example
Normal file
8
include/config.h.example
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#define MQTT_TOPIC_START "led1"
|
||||||
|
#define MQTT_USER ""
|
||||||
|
#define MQTT_PASS ""
|
||||||
|
#define MQTT_BROKER "mqtt.example.com"
|
||||||
|
#define MQTT_CLIENT_ID "LED-Schrank-1"
|
||||||
|
|
||||||
|
const char* SSID = "WIFISSID";
|
||||||
|
const char* PSK = "WIFIPASS";
|
|
@ -1,4 +1,5 @@
|
||||||
#include <LEDStripe.h>
|
#include <LEDStripe.h>
|
||||||
|
|
||||||
|
#define foo "BAR"
|
||||||
|
|
||||||
void fade(LEDStripe* led);
|
void fade(LEDStripe* led);
|
13
src/main.cpp
13
src/main.cpp
|
@ -3,6 +3,7 @@
|
||||||
#include <PubSubClient.h>
|
#include <PubSubClient.h>
|
||||||
#include <LEDStripe.h>
|
#include <LEDStripe.h>
|
||||||
#include <fade.h>
|
#include <fade.h>
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#define REDPIN1 5
|
#define REDPIN1 5
|
||||||
#define GREENPIN1 4
|
#define GREENPIN1 4
|
||||||
|
@ -12,22 +13,11 @@
|
||||||
#define GREENPIN2 14
|
#define GREENPIN2 14
|
||||||
#define BLUEPIN2 16
|
#define BLUEPIN2 16
|
||||||
|
|
||||||
#define MQTT_TOPIC_START "led1"
|
|
||||||
#define MQTT_USER ""
|
|
||||||
#define MQTT_PASS ""
|
|
||||||
#define MQTT_BROKER "mqtt.example.com"
|
|
||||||
#define MQTT_CLIENT_ID "LED-Schrank-1"
|
|
||||||
|
|
||||||
const char* SSID = "WIFISSID";
|
|
||||||
const char* PSK = "WIFIPASS";
|
|
||||||
|
|
||||||
WiFiClient espClient;
|
WiFiClient espClient;
|
||||||
PubSubClient client(espClient);
|
PubSubClient client(espClient);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int Sync = 0; //Sync LED2 on the value of LED1
|
int Sync = 0; //Sync LED2 on the value of LED1
|
||||||
|
|
||||||
LEDStripe led1 = {0, 0, 5000, 0, 0, 0, 0, 0, 0};
|
LEDStripe led1 = {0, 0, 5000, 0, 0, 0, 0, 0, 0};
|
||||||
|
@ -243,6 +233,7 @@ void prepareMQTT() {
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
Serial.println(foo);
|
||||||
pinMode(LED_BUILTIN, OUTPUT);
|
pinMode(LED_BUILTIN, OUTPUT);
|
||||||
Serial.println();
|
Serial.println();
|
||||||
Serial.println("Start LED-Controller");
|
Serial.println("Start LED-Controller");
|
||||||
|
|
Loading…
Reference in a new issue