With just one off-the-shelf part and some programming, you can have a standalone gadget that displays the latest HackerNews story, and notifies you of changes to your karma!
OSYK3477.MOV
This project is perfect for electronics beginners with some experience in software; this walk-through was written with the assumption that you are starting from scratch.
Features:
- Displays the newest or toppest HackerNews story
- Scannable QR code that takes you to the comment section of the story
- Notifies you when your karma changes
Pre-requisites:
- ESP32 Development Board with LCD Screen ( I tested these steps using https://www.amazon.com/HiLetgo-Display-Bluetooth-Internet-Development/dp/B07X1W16QS )
Installation:
- Install the Arduino 1.8.19 IDE: https://www.arduino.cc/en/software#legacy-ide-18x
- Start the Arduino IDE, open File -> Preferences, and add this URL to enable the ESP32 toolchain: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- Open Tools -> Board Manager and install the ESP32 toolchain
- Open Tools -> Boards and choose ESP32 Dev Module
- Connect the ESP32 board to your computer, and choose the Port it is using from Tools -> Ports (if in doubt, note the Ports, close the Tools Menu, then unplug the board, and check the Ports again to see which one disappeared)
- Open Tools -> Manage Libraries and install ArduinoJSON, TFT_eSPI, QRcode_eSPI (and dependency), and wordwrap
- Open File -> Preferences and note your Sketchbook location. Using your favorite text editor, open the TFT_eSPI setup file found at
<sketchbook_location>/libraries/TFT_eSPI/User_Setup_Select.h
, add//
to the beginning of the line (comment out)#include <User_Setup.h>
and remove the//
(uncomment) from the line#include <User_Setups/Setup25_TTGO_T_Display.h>
, and save the file
- Copy the hackernews-badge.ino Arduino Sketch from the root of this repository into the IDE window and edit the Options at the top of the source code to match your Access Point settings
- Click the Upload button, and enjoy! To check on the gadget after the code has been uploaded, open Tools -> Serial Monitor
Potential Improvements:
- Connect a vibrating motor / speaker to alert on notifications
- Enumerate device as USB Keyboard and open links on attached computer using button
- Send a link to the article to your phone over Bluetooth using another button