-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
72 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
#!/bin/sh | ||
INSTALLER_PATH=./hardware-installer/src/firmware/esp32 | ||
REPO=https://github.com/lnbits/nostr-zap-lamp/releases/download | ||
PROJECT_NAME=nostrZapLamp | ||
REPO=https://github.com/lnbits/nostr-zap-lamp/releases/download | ||
INSTALLER_PATH=./hardware-installer/src/firmware/esp32 | ||
|
||
git clone https://github.com/lnbits/hardware-installer | ||
mkdir -p $INSTALLER_PATH | ||
|
||
cp versions.json ./hardware-installer/src/versions.json | ||
cp installer/config.js ./hardware-installer/src/config.js | ||
cp installer/Hero.jsx ./hardware-installer/src/Hero.jsx | ||
|
||
mkdir -p $INSTALLER_PATH | ||
for version in $(jq -r '.versions[]' ./hardware-installer/src/versions.json); do | ||
mkdir -p $INSTALLER_PATH/$version | ||
wget $REPO/$version/bootloader.bin | ||
mv bootloader.bin $INSTALLER_PATH/$version | ||
wget $REPO/$version/boot_app0.bin | ||
mv boot_app0.bin $INSTALLER_PATH/$version | ||
wget $REPO/$version/$PROJECT_NAME.ino.bin | ||
mv $PROJECT_NAME.ino.bin $INSTALLER_PATH/$version | ||
wget $REPO/$version/$PROJECT_NAME.ino.partitions.bin | ||
mv $PROJECT_NAME.ino.partitions.bin $INSTALLER_PATH/$version | ||
wget $REPO/$version/$PROJECT_NAME.ino.bootloader.bin | ||
mv $PROJECT_NAME.ino.bootloader.bin $INSTALLER_PATH/$version | ||
done | ||
|
||
cd hardware-installer | ||
npm install | ||
vite build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export const Hero = () => { | ||
return ( | ||
<div id="hero"> | ||
<h1>Nostr Zap Lamp!!!!!</h1> | ||
<h2>It also has a subline</h2> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
export const addressesAndFiles = [ | ||
{ | ||
address: "0x1000", | ||
fileName: "nostrZapLamp.ino.bootloader.bin", | ||
}, | ||
{ | ||
address: "0x8000", | ||
fileName: "nostrZapLamp.ino.partitions.bin", | ||
}, | ||
{ | ||
address: "0xE000", | ||
fileName: "boot_app0.bin", | ||
}, | ||
{ | ||
address: "0x10000", | ||
fileName: "nostrZapLamp.ino.bin", | ||
}, | ||
]; | ||
|
||
export const configPath = "elements.json"; | ||
export const elements = [ | ||
{ | ||
name: "ssid", | ||
value: "", | ||
label: "WiFi SSID", | ||
type: "text", | ||
}, | ||
{ | ||
name: "password", | ||
value: "", | ||
label: "WiFi Password", | ||
type: "text", | ||
}, | ||
{ | ||
name: "relay", | ||
value: "", | ||
label: "Nostr Relay URL", | ||
type: "text", | ||
}, | ||
{ | ||
name: "pubkey", | ||
value: "", | ||
label: "Nostr Public Key in hex", | ||
type: "text", | ||
}, | ||
]; |