https://github.com/lnbits/nostr-zap-lamp
Get a visual Zap! when someone zaps your or anyone on Nostr.
https://github.com/lnbits/nostr-zap-lamp
Last synced: over 1 year ago
JSON representation
Get a visual Zap! when someone zaps your or anyone on Nostr.
- Host: GitHub
- URL: https://github.com/lnbits/nostr-zap-lamp
- Owner: lnbits
- Created: 2023-08-02T12:24:42.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-06T07:08:23.000Z (over 1 year ago)
- Last Synced: 2024-11-06T07:36:33.334Z (over 1 year ago)
- Language: C++
- Homepage: https://nostr-zap-lamp.lnbits.com/
- Size: 14.1 MB
- Stars: 17
- Watchers: 2
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nostr Zap Lamp

Get a visual "Zap!"" when someone zaps you or anyone on Nostr.
The Nostr Zap Lamp flashes when a relay broadcasts a Nostr event of kind 9735. You can set the lamp to flash zaps sent to a specific npub, or any npub on nostr.
The number of flashes corresponds to the number of digits in the number of sats sent. i.e. 3 sats will result in 1 flash, 152 sats will result in 3 flashes, 1001 sats will result in 4 flashes.
[Buy a pre-assembled or complete Zap Lamp kit on the LNbits shop](https://shop.lnbits.com/product/nostr-zap-lamp)
# Features
+ Show a signal when a zap is sent to one or all nostr npubs
+ Background brightness control
+ Easily configure to use your own nostr relay
+ Simple configuration to work with any npub
## Parts
+ [LED "Neon" lamp](https://www.amazon.co.uk/YIVIYAR-Lightning-Battery-Bedroom-Christmas/dp/B08K4SCVKQ)
+ An ESP32 dev board
+ USB cable
+ A momentary switch push button - For example https://www.amazon.com/Momentary-Spring-Return-Self-Return-Pushbutton-Switches/dp/B09DJY5Y5L
+ Four jumper cables
+ Block connectors
+ A case. [This repo includes files for a 3D printed case](enclosure)
## Build Instructions
+ Identify the positive and negative leads of the lamp. Tie a knot in the +ve lead for future identification
+ Cut the lamp leads to around 10cm long
+ Attach a female jumper lead to each. Solder or use block connectors to attach the leads.
+ Attach female jumper leads to the push button
+ Connect the lamp to the ESP32: GPIO13 on the ESP32 -> lamp's positive wire and GND on the ESP32 -> lamp's negative wire.
+ Connect the push button button to the ESP32 on GPIO4 and GND
+ Install the lamp, ESP32, button and lead in the printed enclosure
+ Power on the device and configure using the WiFi access point portal.
## Firmware Upload Instructions
+ Use the web installer at https://nostr-zap-lamp.lnbits.com/ to flash and configure the device
+ Alternatively, use the Arduino IDE to flash the firmware.
- Install the ESP32 board in the Arduino IDE by adding the following URL to the board manager: https://dl.espressif.com/dl/package_esp32_index.json
- Install the following libraries using the Arduino IDE library manager:
- uBitcoin
- WebSockets
- ArduinoJson
- base64
- WiFiManager
- Nostr
- Open the nostrZapLamp.ino file in the Arduino IDE
- Select the ESP32 Dev Module board and the correct port
- Compile and upload the firmware
- Use the web installer at https://nostr-zap-lamp.lnbits.com/ to configure the device
## 5v Relay option
Using a 5v Relay the lamp will be brighter, or you can swap out the light and connect anything to the relay that you want to turn on.
ESP32 GND <==========================> Relay "DC-"
ESP32 5V <==========================> Relay "DC+"
LED POS <===========================> Relay "DC+"
ESP32 GND <=========================> Relay "COM"
LED GND <===========================> Relay "NO"
GPIO 13 <===========================> Relay "S"