Skip to content

Commit

Permalink
Merge branch 'main' into Readme-update
Browse files Browse the repository at this point in the history
  • Loading branch information
dni authored Feb 26, 2025
2 parents 281ef38 + 892fd10 commit 5c62937
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 120 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/arduino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
fqbn: ${{ matrix.fqbn }}
platforms: |
- name: esp32:esp32
- name: esp32:esp32@2.0.17
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
sketch-paths: |
- lnpos/lnpos.ino
Expand All @@ -36,7 +36,7 @@ jobs:
- --build-property
- upload.maximum_size=1966080
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: sketches-reports
path: sketches-reports
Expand All @@ -49,7 +49,7 @@ jobs:
steps:
# This step is needed to get the size data produced by the compile jobs
- name: Download sketches reports artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: sketches-reports
path: sketches-reports
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v4
with:
path: "hardware-installer/dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

Check out this [video tutorial](https://twitter.com/arcbtc/status/1585605023337168896) on the Makerbits channel or the
<a href="https://twitter.com/arcbtc/status/1484942260013838336">original demo</a>.

<img src="https://github.com/arbadacarbaYK/lnpos/assets/63317640/6c73f327-6806-4f81-a9e1-651526a8d427" alt="switch_front" width="200">
<img src="https://github.com/arbadacarbaYK/lnpos/assets/63317640/4a7fd0bd-34ed-45f7-853e-f69aeb24bd6b" alt="switch_front" width="200">

# Flash and configure via webinstaller https://lnpos.lnbits.com/
## Free and open-source bitcoin point-of-sale
## Easy setup using browser https://lnpos.lnbits.com

### LNPoS includes

Expand Down
2 changes: 1 addition & 1 deletion build-webinstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ git clone https://github.com/lnbits/hardware-installer

cp INSTALLER.md ./hardware-installer/public/INSTALLER.md
cp versions.json ./hardware-installer/src/versions.json
cp installer/config.js ./hardware-installer/src/config.js
cp config.js ./hardware-installer/src/config.js

sed -i "s/%title%/$PROJECT_NAME/g" ./hardware-installer/index.html

Expand Down
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/sh
command -v arduino-cli >/dev/null 2>&1 || { echo >&2 "arduino-cli not found. Aborting."; exit 1; }
arduino-cli config --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json init
arduino-cli config --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json init --overwrite
arduino-cli core update-index
arduino-cli core install esp32:esp32
arduino-cli upgrade
# uBitcoin is broken on esp32 3.x.x
arduino-cli core install esp32:[email protected]
arduino-cli lib install ArduinoJson Base64 Keypad uBitcoin
arduino-cli compile \
--build-property "build.partitions=min_spiffs" \
Expand Down
4 changes: 2 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const elements = [
},
{
name: "config_decimalplaces",
value: "",
value: 2,
label: "FIAT Decimal Places",
type: "text",
},
Expand All @@ -91,4 +91,4 @@ export const elements = [
label: "WiFi Password",
type: "text",
},
];
];
94 changes: 0 additions & 94 deletions installer/config.js

This file was deleted.

4 changes: 2 additions & 2 deletions lnpos/100_config.ino
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void readFiles()
secretATM = getValue(lnurlATM, ',', 1);
currencyATM = getValue(lnurlATM, ',', 2);
Serial.println("");
Serial.println("lnurlPoS: " + lnurlPoS);
Serial.println("lnurlATM: " + lnurlATM);
if (secretATM != "")
{
menuItemCheck[3] = 1;
Expand Down Expand Up @@ -293,4 +293,4 @@ void readFiles()
}
}
paramFile.close();
}
}
7 changes: 7 additions & 0 deletions lnpos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
0.1.4
======
- Fix typo with logging 'lnurlATM' configuration to serial
- Remove unused WebServer to reduce build time, file size and installation time
- Show a little "arrow" in front of the selected menu item to avoid ambiguity when only 2 menu items are present (or when the user is color blind)
- Make "USB" indicator blue so it looks better and is easier to distinguish
- Show firmware version at boot to allow the user to easily check which version is running (handy for troubleshooting)
20 changes: 12 additions & 8 deletions lnpos/lnpos.ino
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#include <WiFi.h>
#include <WebServer.h>
#include <FS.h>
#include <SPIFFS.h>
#include <math.h>
using WebServerClass = WebServer;
fs::SPIFFSFS &FlashFS = SPIFFS;
#define FORMAT_ON_FAIL true
#include <Keypad.h>
#include <SPI.h>
#include <TFT_eSPI.h>
#include <Hash.h>
#include <ArduinoJson.h>
#include <stdio.h>
#include "qrcoded.h"
#include "Bitcoin.h"
#include <WiFiClientSecure.h>

// ArduinoJson, Keypad and uBitcoin should be installed using the Arduino Library Manager.
// The latest versions should work, verified with ArduinoJson 7.2.1, Keypad 3.1.1 and uBitcoin 0.2.0
#include <Hash.h>
#include <Bitcoin.h>
#include <Keypad.h>
#include <ArduinoJson.h>

#define VERSION "0.1.4"
#define PARAM_FILE "/elements.json"
#define KEY_FILE "/thekey.txt"
#define USB_POWER 1000 // battery percentage sentinel value to indicate USB power
Expand Down Expand Up @@ -1121,6 +1123,7 @@ void logo()
tft.print("PoS");
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.setTextSize(2);
tft.print(VERSION);
tft.setCursor(0, 80);
tft.print("Powered by LNbits");
}
Expand All @@ -1142,7 +1145,7 @@ void updateBatteryStatus(bool force = false)
String batteryPercentageText = "";
if (batteryPercentage == USB_POWER)
{
tft.setTextColor(TFT_GREEN, TFT_BLACK);
tft.setTextColor(TFT_BLUE, TFT_BLACK);
batteryPercentageText = " USB";
}
else
Expand Down Expand Up @@ -1289,13 +1292,14 @@ void menuLoop()
{
tft.setTextColor(TFT_GREEN, TFT_BLACK);
selection = menuItems[i];
tft.print("-> ");
}
else
{
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.print(" ");
}

tft.print(" ");
tft.println(menuItems[i]);
menuItemCount++;
}
Expand Down
4 changes: 3 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"esp32"
],
"versions": [
"v0.1.3",
"v0.1.2",
"v0.1.1",
"v0.1.0",
"v0.0.0",
"v0.0.0"
]
}

0 comments on commit 5c62937

Please sign in to comment.