Weather station that links to your google calendar and fetches all your tasks to show on Oled display.
App shows all your events for the day on the display. It also shows the weather for the day and the time.
deployed appscript fetches all your tasks for the day, also creates a new event for the day and adds it to your calendar when a command from the device is sent.
- Create a new project in google apps script
- Copy the 'ReadEvents' code from the appscript file in this repo
- Create a new calendar in your google calendar
- Modify the code to add the calendar id of the new calendar you created
- Deploy the appscript as a web app
Repeat the same steps for the 'CreateEvent' code in the appscript file. You can use the same calendar id for both the web apps.
Snippets of what to change in both instances.
In the 'ReadEvents' code :
// Replace MySchedules with your calendar name
function GetEvents(){
var _calendarName = 'MySchedules'
....
In the 'CreateEvent' code :
// Replace MySchedules with your calendar name
function CreateEvent(eve){
var _calendarName = 'MySchedules'
....
Setup the cuircuit as shown in the image below
-
Clone the repo
-
Open the project in Arduino IDE and install the ESP8266 in board manager
-
Install the following libraries
-
Modify the code to add your wifi credentials and the url of the deployed appscript
// Open an account on https://openweathermap.org/ and get your free API key
// modify the following lines to add your open weather map id and location
String OPEN_WEATHER_MAP_APP_ID = "replace_me";
String OPEN_WEATHER_MAP_LOCATION_ID = "179330"; //juja
// change language of weather description
String OPEN_WEATHER_MAP_LANGUAGE = "en";
const uint8_t MAX_FORECASTS = 4;
// metric / imperial ?
const boolean IS_METRIC = true;
// Months and days -- change this to your prefered language
const String WDAY_NAMES[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
const String MONTH_NAMES[] = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"};
// Replace with your wifi credentials -- CHECK : https://github.com/GavinsMJ/uC-uP-Tricks-and-Cheats/tree/main/MultiWiFiConnect for more information
// wifi access points
//Higher Priority networks
const char* PKNOWN_SSID[] = {"net1"}; // Replace with your network names
const char* PKNOWN_PASSWORD[] = {"net1Password"};
//Lower Priority Networks
const char* KNOWN_SSID[] = {"Net2", "net3", "net4"}; // Replace with your network names
const char* KNOWN_PASSWORD[] = {"net2pass", "net3pass", "net4pass"};
// number of known networks
const int PKNOWN_SSID_COUNT = sizeof(PKNOWN_SSID) / sizeof(PKNOWN_SSID[0]);
const int KNOWN_SSID_COUNT = sizeof(KNOWN_SSID) / sizeof(KNOWN_SSID[0]);
// Replace with the Google Script ID of the deployed appscripts
//Google Script ID
const char *GScriptIdRead = "replace - me"; //replace with you gscript id for reading the calendar
const char *GScriptIdWrite ="replace - me"; //replace with you gscript id for writing the calendar
For custom logo visit https://javl.github.io/image2cpp/ and convert your image to c++ array.
The wifi credentials are set in a hierarchical manner CHECK for more information.
Final image of the device in action
Video :
working.mp4
All animations and display effects can be changed in the firmware code.