mirror of
https://github.com/nikdoof/busylight.git
synced 2025-12-24 07:49:22 +00:00
Support Telegram
This commit is contained in:
30
include/config_example.h
Normal file
30
include/config_example.h
Normal file
@@ -0,0 +1,30 @@
|
||||
// Type of RGB LED, adjusts the brightness calculations.
|
||||
#define LED_TYPE 0 // 0 = Anode, 1 = Cathode
|
||||
|
||||
// GPIO pins for each colour
|
||||
#define RED_LED_PIN 4
|
||||
#define GREEN_LED_PIN 0
|
||||
#define BLUE_LED_PIN 2
|
||||
|
||||
// Defines how many gradients a PWM pin has on this device, for ESP devices
|
||||
// its 1024, on other systems its 255. Adjust as needed if you don't get
|
||||
// accurate colour representation.
|
||||
#define PWM_MAX_VALUE 1024
|
||||
|
||||
// WIFI connection details
|
||||
#define WIFI_SSID "ssid"
|
||||
#define WIFI_PASS "s3cur3"
|
||||
|
||||
// Enables the webserver
|
||||
#define WEBSERVER
|
||||
|
||||
// Enable MQTT connection (not complete)
|
||||
//#define ENABLE_MQTT
|
||||
#define MQTT_SERVER "mqtt.local"
|
||||
#define MQTT_PORT 1883
|
||||
|
||||
// Enable Telegram connection
|
||||
//#define ENABLE_TELEGRAM
|
||||
#define TELEGRAM_BOT_TOKEN "xxx:xxx"
|
||||
|
||||
|
||||
18
include/statuses.h
Normal file
18
include/statuses.h
Normal file
@@ -0,0 +1,18 @@
|
||||
struct status
|
||||
{
|
||||
char name[20];
|
||||
int r;
|
||||
int g;
|
||||
int b;
|
||||
int blink;
|
||||
};
|
||||
|
||||
struct status statuses[] = {
|
||||
{"busy", 255, 0, 0, 0},
|
||||
{"available", 0, 255, 0, 0},
|
||||
{"away", 150, 255, 0, 0},
|
||||
{"ooo", 255, 0, 255, 0},
|
||||
{"offline", 0, 0, 0, 0},
|
||||
{"blue", 0, 0, 255, 10}
|
||||
};
|
||||
#define STATUSES_COUNT 6
|
||||
Reference in New Issue
Block a user