ePaper Display und Google Kalender mit ESP8266 - AZ-Delivery
Nowadays, many use their smartphone to do everyday things like planning appointments. But with many notifications, you can quickly lose track of upcoming appointments. In this blog post we will be a calendar with a e-paper display and one ESP8266 microcontroller Build that shows the upcoming appointments. So that the dates are always up to date, we use it on the Internet with a so -called API interface to. A program that contains this function is that Google Calendarwhich is also available on many operating systems. Only a Google account is required for this, which can be created free of charge, if not yet available.

Hardware

We need hardware:

2.9 “Epaper display

ESP8266 microcontroller Nodemcu or D1 Mini

Optional:

Button

3D printed housing

Screws & melting thread

First of all, the display must be connected to the microcontroller. This can either be connected via a cable connection directly soldered, or via a self -cramped cable, which is plugged into the pen strip of the display.

ESP8266 Node MCU 2.9 “Epaper display  
3V3 VCC
Gnd Gnd
D7 SDI
D5 SCLK  
D4 CS
D2 D/C
D1 Reset
D3 Busy

Wiring with a socket bar

Soldering the socket bar as shown

software

The required software consists of two parts:

1 Google script

First go to the Google Calendar website, register with your account and create a new calendar on the left at "More Calendar". Under this calendar, you will save all appointments that are to be displayed on the display in the future.

Now open the Google Script website, register with the same Google account as above. Next, click on the "New Project" button on the top left,

Now a window opens in which you copy the following code:





Finally, press the blue field “Provide"And choose there"New provision" out of. In the newly opened window, select the deployment option “Web app“.

Now enter a description and change the right of access to "Everyone". In the next step you will be a "Defective ID"Displayed. This is the Api-Key, via which the ESP can later access the data. This must then be inserted into the source code. To test the script, you can open the link below. As a result, the dates of the next 14 days with a start and end date should be displayed separately with a semicolon.

This script only reads the dates from a calendar. If you want to display several calendars, you have to copy the block and insert it with a changed calendar name. (However, only the first 4 appointments of the chain are displayed on the display).

If you want to read further data from your calendar, you will find the necessary information in the Google Developer Docs.

2 Arduino Ide/Platform IO

Arduino IDE

First you have to install the associated libraries:

Arduinojson

Https redirect

GXedp2

Adafruitgfx

If you are programming a microcontroller with ESP8266 processor for the first time, you must still Preferences in the Board administrator-URL Copy field: http://arduino.esp8266.com/stable/package_esp8266com_index.json. Then install via the Board manager the ESP8266 Package.

Platform io

Copy the following lines into the Platformio.ini file of your project:





The sketch

Sketch download

First, the required libraries and the fonts (fonts) installed with the Library display are integrated.





Subsequently structs created for the individual dates and their time. These are then saved in the form of a list of four elements.





After that, variables for the line break are initialized for longer names and for the network.





Now we create objects for the Wificlient, which will later be used by the server to read the data and an object for the display. If your display does not work (older version), select another driver from the list by removing the comment sign of the line.





Below you can set the colors of the title, the appointments and the appointment time, as well as the title.





In the set up() Only the display and the LED status is initialized.





In the Loop () The ESP first connects to the WLAN, during which the status LED flashes. If no connection is still established after 20 seconds, the ESP is restarted. After a successful connection, the display is using the method Display event () described.





The following method establishes a connection to the server, reads the data in the form of a string and extracted by calling up Extractdata () The individual data (start time, name, end time).





In the night function, searches for the semicolons that separate the individual data and then stored this data as a string in the list, in the associated elements.





The following method reads out of the string, which stores time, the minute, hour, day and the day of the week and saves it in struct Time of the individual elements.





The method Convdayname () Convert the English weekday name in the Germans.





Display event () is in the Loop () Called up function to display the event with the handed over on the display.





The following method is called to display a disturbance on the LED status:





Assembly and operation

Print The housing With a 3D printer and press the melting thread (M3) into the intended holes with a hot soldering iron. Finally, glue the board with the USB socket in the recess and recently screw the display with the right screws from the outside.

After you have connected a power supply, the next four appointments will be displayed automatically every hour on the display. After pressing the button, the appointments are updated immediately. The display will flash several times while describing. This is normal, the color capsules are aligned on the display.

Have fun recovery :)

DisplaysEsp8266Projekte für anfänger

8 comentarios

Reimund

Reimund

Hallo wie druckt man denn das Gehäuse ? Mit Support?

Henry

Henry

Korrektur, man muss natürlich etwas in den Kalender eintragen, dann kommt etwas.
Die Berechtigung muss aber erteilt werden.

Jetzt muss nur noch der “richtige” Kalender laufen.

cu

Henry

Henry

Hallo,
auch bei einem neu angelegtem Kalender erfolgt diese Abfrage, da dies ja noch nichts mit dem Kalendernamen zu tun hat.
Zugriffsberechtigte “jeder” kann nur bei ausführen als “ich” ausgewählt werden.
Nach → weiter kommt die Abfrage.
Auch nach zulassen des Zugriffes der Webapp auf den Kalender kommen mit der URL keine Daten.

cu

Bastian Brumbi

Bastian Brumbi

Sehr geehrter Leser,
erstellen Sie einfach wie unter Punkt 1 beschrieben einen neuen Kalender auf der Google Calendar Website. Hier müssen Sie einen Namen für den Kalender eintragen, diesen Namen tragen Sie in die Google Script Datei anstatt Test ein. Eine weitere Autorisierung ist hier nicht notwendig.
Ich hoffe ich konnte ihnen Weiterhelfen.
Grüße,
Bastian Brumbi

Henry

Henry

Ganz so einfach wie beschrieben ist es nicht.
Wo findet man denn den korrekten Kalendernamen von Google, der statt (test) eingetragen werden muss?
Und “jeder” funktioniert auch nicht wie beschrieben, hier muss anschließend autorisiert werden, nur wie?

cu

Andreas Wolter

Andreas Wolter

If you use the download, it should work. The original source code on the homepage may have been changed during translation.

Best regards,
Andreas Wolter
AZ-Delivery Blog

laatste

laatste

use the code from the german language page because the the english translation makes a mess of the original code.

Rob Versteden

Rob Versteden

The code to copy has several flaws. Use the printed one to correct it before implementing. I guess you have used an overactive spelling corrector.
But it’s a nice project!

Deja un comentario

Todos los comentarios son moderados antes de ser publicados