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
# Install dependencies | |
$ yarn | |
# Run the application | |
$ node src/app.js | |
# Or, if you are using a remote session: | |
$ DISPLAY=":0" node src/app.js |
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
Flag | Description | |
---|---|---|
--kiosk | Removes all toolbars and menus and restricts most actions. Forces a full-screen appearance. | |
--disable-notifications | Stops websites from asking for permission for certain things like notifications. | |
--enable-automation | Removes the info-bar from the tops of pages warning that Chrome is being controlled remotely. | |
--noerrdialogs | Suppresses error dialogs if encountered. | |
--crash-on-hang-threads | Forces an exit if the UI or IO thread hangs. |
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
$ node scripts/package_and_upload_custom_functions.js | |
Found a total of 3458 files to add to the archive. | |
Deploying project to HarperDB, please wait... | |
Deployment finished - Successfully deployed project: api |
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
// Required configuration | |
const HDB_INSTANCE_NAME = 'signs' | |
const HDB_ACCOUNT = 'makvoid' | |
const HDB_USERNAME = 'signs_admin' | |
const HDB_PASSWORD = '...' | |
const HDB_PROJECT_NAME = 'api' |
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
export const environment = { | |
apiUrl: 'https://functions-signs-makvoid.harperdbcloud.com/api/', | |
... |
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
$ git clone https://github.com/makvoid/guide-harperdb-digital-signage.git |
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
import adafruit_ahtx0 | |
from adafruit_datetime import datetime | |
from adafruit_requests import Session | |
import board | |
from busio import I2C | |
from digitalio import DigitalInOut, Direction | |
from socketpool import SocketPool | |
from ssl import create_default_context | |
from time import monotonic, sleep | |
from wifi import radio |
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
# For the D1 Mini ESP8266 | |
from machine import Pin | |
from time import sleep | |
# Setup the LED | |
led = Pin(2, Pin.OUT) | |
led.value(1) # Turn the LED off initially | |
# Blink the LED 5 times | |
for _ in range(10): |
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
# For the NodeMCU ESP32-C3–32S development kit | |
import board | |
from digitalio import DigitalInOut, Direction | |
from time import sleep | |
# Setup an LED | |
def setup_led(led_pin): | |
led = DigitalInOut(getattr(board, led_pin)) | |
led.direction = Direction.OUTPUT | |
# Ensure the LED is off |
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
# Sled / Default format (FM7) | |
default_format = '<iI27f4i20f5i' | |
# Dash format (FM7) | |
dash_format = default_format + '17fH6B3b' | |
# Horizon format (FH4+) | |
horizon_format = default_format + 'i19fH6B4b' |