pitrix/include/config.sample.h

96 lines
3.7 KiB
C
Raw Normal View History

2019-06-05 04:29:47 +00:00
#pragma once
2019-05-30 11:11:42 +00:00
#include <Arduino.h>
#define FASTLED_INTERNAL
#include <FastLED.h>
2019-05-30 11:11:42 +00:00
//#define DEBUG // Uncomment this to enable Debug messages via Serial and, if enabled, MQTT.
2019-06-06 04:41:11 +00:00
//#define CONFIG_USABLE // Uncomment this by removing the // at the beginning!
#define WIFI_SSID "..." // SSID of the wifi to connect to
#define WIFI_PASS "..." // Password of the wifi
2019-05-21 03:52:57 +00:00
#define LED_WIDTH 16 // Number of LEDs in horizontal direction
#define LED_HEIGHT 16 // Number of LEDs in vertical direction
#define LED_COUNT 256 // Total number of LEDs. WIDTH*HEIGHT.
#define LED_TYPE WS2812B // Type of LEDs
#define DATA_PIN 14 // PIN the LEDs are connected to on the microcontroller
#define COLOR_ORDER GRB // Order of the colors of the LEDs. If you get unexpected colors, you should change this.
#define BRIGHTNESS 20 // Default brightness of the LEDs. 1 (lowest)-255 (brightest)
#define TEMPORAL_DITHERING 0 // Use temporal dithering. Can lead to flickering.
#define LED_MAX_MILLIAMPS 0 // If your power supply is too small, you can set this to a maximum mA value. FastLED should then honor this. Setting it to 0 disables this limit.
2019-05-21 03:52:57 +00:00
#define NTP_SERVER "pool.ntp.org" // NTP server to use to fetch the current time
#define NTP_INTERVAL 300000 // Interval in ms to update the time from the NTP server. 300000 ms = 5 minutes
#define NTP_OFFSET 7200 // Offset of your local time from UTC in seconds. Germany, daylight savings time = 2 hours = 7200 seconds
2019-05-21 03:52:57 +00:00
2019-06-12 18:57:31 +00:00
#define HTTP_SERVER_ENABLE
#define HTTP_SERVER_PORT 80
#define MQTT_ENABLE // Use MQTT. Add slashes to the start of the line to disable MQTT completely.
#define MQTT_SERVER "..." // Data for connecting to the MQTT server
2019-05-21 03:52:57 +00:00
#define MQTT_PORT 1883
2019-05-30 11:11:42 +00:00
#define MQTT_USER "..."
#define MQTT_PASS "..."
#define MQTT_TOPIC "pitrix/" // MQTT topic to listen to. Must not start with a slash, but must end with one.
#define MQTT_REPORT_METRICS // Whether to report metrics via MQTT. Disable if unwanted.
2019-06-07 04:30:15 +00:00
#define MQTT_TOPIC_WEATHER "accuweather/pitrix/" // MQTT topic to listen for weather data. Must not start with a slash, but must end with one.
2019-05-21 03:52:57 +00:00
#define HOSTNAME "pitrix-%08X" // Hostname of the ESP to use for OTA and MQTT client id. %08X will be replaced by the chip id.
#define OTA_STARTUP_DELAY 10 // How many seconds to wait at startup. This is useful to prevent being unable to flash OTA by a bug in the code. Set to 0 to disable.
2019-05-21 03:52:57 +00:00
#define FPS 50
#define SHOW_TEXT_DELAY 100
#define MONITOR_LOOP_TIMES false
#define MONITOR_LOOP_TIME_THRESHOLD 500
#define MONITOR_LOOP_TIME_COUNT_MAX 10
2019-05-30 11:11:42 +00:00
#define EFFECT_CYCLE_TIME 300 // Time in seconds between cycling effects.
2019-06-05 04:29:47 +00:00
#define EFFECT_CYCLE_RANDOM false
2019-05-30 11:11:42 +00:00
#define EFFECT_MATRIX_LENGTH_MIN 4
#define EFFECT_MATRIX_LENGTH_MAX 20
#define EFFECT_MATRIX_SPEED_MIN 50
#define EFFECT_MATRIX_SPEED_MAX 135
#define EFFECT_SINGLE_DYNAMIC_LOOP_TIME 40
2019-05-30 11:11:42 +00:00
#define EFFECT_MULTI_DYNAMIC_LOOP_TIME 1400
#define EFFECT_CONFETTI_PIXELS_PER_LOOP 2
2019-05-31 03:45:07 +00:00
#define EFFECT_SNAKE_DIRECTION_CHANGE 10
#define EFFECT_SNAKE_SLOWDOWN 2
#define EFFECT_FIRE_COOLDOWN 192
#define EFFECT_FIRE_SPARK_CHANCE 5
2019-06-06 04:41:11 +00:00
#define EFFECT_FIREWORK_SHOT_CHANCE 200
#define EFFECT_FIREWORK_BLUR 200
#define EFFECT_FIREWORK_FADEOUT_SPEED 5
2019-06-07 04:24:16 +00:00
2019-06-05 04:29:47 +00:00
// Stop editing here
2019-05-30 11:11:42 +00:00
#ifdef DEBUG
2019-06-07 04:24:16 +00:00
#ifdef MQTT_ENABLE
#include "my_mqtt.h"
#define LOG(x) mqtt_log(x); Serial.print(x);
#define LOGln(x) mqtt_log_ln(x); Serial.println(x);
#else
#define LOG(x) Serial.print(x);
#define LOGln(x) Serial.println(x);
#endif
2019-05-30 11:11:42 +00:00
#else
2019-06-07 04:24:16 +00:00
#define LOG(x) do {} while(0);
#define LOGln(x) do {} while(0);
2019-05-30 11:11:42 +00:00
#endif
2019-06-06 04:41:11 +00:00
#if !defined( ESP8266 ) && !defined( ESP32 )
#error "Neither ESP8266 nor ESP32 are set. Maybe you are compiling this for another platform...?"
#endif
2019-06-06 04:41:11 +00:00
#ifndef CONFIG_USABLE
2019-06-07 04:24:16 +00:00
#error "CONFIG_USABLE isn't set!"
2019-06-06 04:41:11 +00:00
#endif