E-Ink newspaper on M5Paper ESP32 Kit
- Temperature/Humidity data collected by the device.
- Weather/XKCD/HackerNews/arXiv data from the internet.
- Low power consumption: last ~3 weeks (update every 30mins).
- NTP time sync, partial refresh.
- Frontend: Vue App deployed on AWS S3.
- Data Update: AWS CloundWatch periodically calls AWS Lambda function to update the json data on S3.
- Image Render: Puppeteer caputures screenshot of the frontend, and save it to S3.
- Display: Device fetches the screenshot and display it with its temperature and humidity sensor data.
The sever is built with AWS SAM.
Install/Config SAM: Getting started with AWS SAM
Go to aws
directory and install dependencies:
$ cd aws
$ npm install
$ sam deploy --guided
Parameters:
AppBucketName
: the UNIQUE S3 bucket name to serve the web application.UpdateSchedule
: the schedule to update data, in AWS CloundWatch Events Schedule Expression format. Default: every 30min.Latitude
: Client LatitudeLongitude
: Client Longitude
The server url will be http://<AppBucketName>.s3-website-<AWS_REGION>.amazonaws.com
Go to web
directory and install dependencies:
$ cd web
$ npm install
$ cp .env.local.example .env.local
Edit .env.local
:
VUE_APP_OWM_APPID
: Your Openweather API key.VUE_APP_LAT
: Default Latitude (can be overrided by SAM settings).VUE_APP_LON
: Default Longitude (can be overrided by SAM settings).
Build Frontend:
$ npm build
Upload files under dist
directory to S3 bucket (grant public-read access under Permissions panel when upload).
Go to arduino/ytimes
directory and copy the config:
$ cd arduino/ytimes
$ cp ytimes_config.example.h ytimes_config.h
Edit ytimes_config.h
:
WIFI_SSID
: WIFI SSIDWIFI_PWD
: WIFI passwordTIMEZONE_OFFSET
: UTC time offsetIMG_URL
:http://<AppBucketName>.s3-website-<AWS_REGION>.amazonaws.com/index.jpg
REFRESH_INTERVAL
: refresh interval, in seconds.
Upload the font file data/iosevka-fixed-ss15-medium.ttf
via SPIFFS.
Compile & Upload code with Arduino.
Temperature sensor data is not very accurate.