https://github.com/dwr2118/locked-in-light
Locked-in-light is a tool that helps communicate your current working status and task. This was the final project for my Creative Embedded Systems course (COMS BC3930).
https://github.com/dwr2118/locked-in-light
esp32 locked-in netlify ngrok ultrasonic-sensor-distance
Last synced: 3 months ago
JSON representation
Locked-in-light is a tool that helps communicate your current working status and task. This was the final project for my Creative Embedded Systems course (COMS BC3930).
- Host: GitHub
- URL: https://github.com/dwr2118/locked-in-light
- Owner: dwr2118
- Created: 2024-12-03T17:04:36.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-13T21:41:36.000Z (6 months ago)
- Last Synced: 2025-02-01T17:13:41.289Z (4 months ago)
- Topics: esp32, locked-in, netlify, ngrok, ultrasonic-sensor-distance
- Language: C++
- Homepage: https://denim-duckling-124.notion.site/Module-4-Locked-in-Lights-1487d975e60580e4acc5dc75ee4d8802?pvs=4
- Size: 17.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# locked-in-light
For my COMS BC3930 Creative Embedded Systems Final Project, I wanted to make a tool to help users communicate their current working status to roommates, family members & more while they work in semi-shared spaces (ie: a 2-bedroom apartment). Below you can find a GIF of the final functionalities of the project: locked-in-light in its enclosure: 
## Design Documentation:
Read more about my creative process [here](https://denim-duckling-124.notion.site/Module-4-Locked-in-Lights-1487d975e60580e4acc5dc75ee4d8802?pvs=4).## What you will need:
1. A LilyGo T-Display board, ultrasonic distance sensor hc sr04 and a push button.
2. Install the correct [driver](https://github.com/Xinyuan-LilyGO/TTGO-T-Display) for the LilyGo T-Display.
3. USB-C cable with working data connections.
4. Install the [Arduino IDE](https://www.arduino.cc/en/software).
5. For editing the API and the web-app, I recommend VSCode as an IDE.## Arduino IDE Setup:
1. Download the TFT_eSPI library by Bodmer:
- Open Arduino IDE
- Click Tools > Manage Libraries
- Search for "tft_espi" by Bodmer and click install.
- Navigate to the library on your computer's file manager (e.g., Documents/Arduino/libraries/tft_espi)
- Open the file "User_Setup_Select.h"
- Comment out "#include " near the top of the page
- Uncomment "#include " further down the page (the lines are in numeric order).2. Install the ESP 32 Board Library:
- We will install it through Arduino IDE.
- First, go to [this website](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html) and under "Installing using Arduino IDE" copy the "Stable release link".
- Open Arduino IDE.
- Click File > Preferences
- At the bottom of the "Settings" tab, in "Additional boards manager URLs", paste the stable release link in the text box, click OK.
- Click Tools > Board > Boards Manager
- Search for 'esp32' by Espressif and click Install
- Download the Simple HCSR04 library too.
## How to recreate this project:
1. After setting up, connect your board to your computer with the USB-C cable.
2. Open Arduino IDE. Click the upper-left dropdown menu to select your Board and Port. It will usually pop-up as "LilyGo T-Display" on port "COM xx".
4. Open 'locked-in-light-code.ino' and upload it to your ESP32 device
5. To get the Locked-in-Light API to work on your local computer:
- go to the root of the web-app directory
- Download the corresponding dependencies using `npm install`
- use `netlify dev` to run the app locally and use `ngrok http http://localhost:8888` to expose this development environment using ngrok
- grab the forwarding URL from ngrok on your terminal and input this link into the index.html, arduino file
- travel to the ngrok URL route to access the website's UI and ngrok URL/color provides the current color and status in JSON.
- try to change the color of your current status by pressing one of the buttons or inputting a new task by typing into the text box and hitting enter
6. Try out the locked in light yourself!