Browse Source

feat(doc): added docu

sezuisa 2 months ago
parent
commit
0cf4d306c7
2 changed files with 23 additions and 3 deletions
  1. 20 0
      README.md
  2. 3 3
      WeatherMatrix/WeatherMatrix.ino

+ 20 - 0
README.md

@@ -0,0 +1,20 @@
+# 16x16 Weather Display
+A little program to display weather data on a 16x16 LED Matrix. The display switches between a weather pictogram and the current temperature. Weather data is obtained from OpenWeatherMap - you need a valid API key to use the program (for further setup steps see section Config below).
+
+## Hardware Basis
+- ESP8266 D1 Mini Board
+- 16x16 NeoPixel LED Matrix
+- Power Supply MicroUSB 5V
+
+## Used Arduino Libraries
+- FastLED
+- ArduinoJson
+- ESP8266HTTPClient
+- ESP8266WiFi
+- ESP8266WiFiMulti
+- WiFiClient
+
+## Setup
+- The program needs a WiFi connection to work. Enter your WiFi SSID and password for the `STASSID` and `STAPSK` defines in the code.
+- To obtain weather data, you need to set up a valid API key for OpenWeatherMap. You can do that [here](https://home.openweathermap.org/users/sign_up). Once you have your key, enter it for the `APIKEY` define in the code.
+- Make sure your microcontroller is hooked up to the LED Matrix correctly - you may need to adjust the `LED_PIN` to your specific setup. This pin should connect to DIN on the LED Matrix.

+ 3 - 3
WeatherMatrix/WeatherMatrix.ino

@@ -4,7 +4,6 @@
 #include <ESP8266WiFi.h>
 #include <ESP8266WiFiMulti.h>
 #include <WiFiClient.h>
-#include <Array.h>
 
 #define LED_PIN  0
 
@@ -18,6 +17,8 @@
 #define STAPSK "Laserjet09"
 #endif
 
+#define APIKEY "e471293b25fdb6697c0a862f2695df5f"
+
 const char* ssid = STASSID;
 const char* password = STAPSK;
 
@@ -551,8 +552,7 @@ void setup() {
   // weather api
   const float lat = 48.9517;
   const float lon = 10.1703;
-  const String apiKey = "e471293b25fdb6697c0a862f2695df5f";
-  apiUrl = buildAPIUrl(lat, lon, apiKey);
+  apiUrl = buildAPIUrl(lat, lon, APIKEY);
   connectWiFi();
 
   if (WiFi.status() != WL_CONNECTED) {