Skip to content

Instantly share code, notes, and snippets.

View tephron4's full-sized avatar

Tobias Ephron tephron4

  • Google
  • Somerville, MA
View GitHub Profile
#include <ArduinoBLE.h>
#include <Preferences.h> // Library for permanent storage
Preferences prefs;
BLEService weightService("19B10000-E8F2-537E-4F6C-D104768A1214"); // Custom UUID
// Define Float Characteristics (Read and Write)
BLEFloatCharacteristic startWeightChar("19B10002-E8F2-537E-4F6C-D104768A1214", BLERead | BLEWrite);
BLEFloatCharacteristic goalWeightChar("19B10003-E8F2-537E-4F6C-D104768A1214", BLERead | BLEWrite);
@tephron4
tephron4 / gist:db63a7f3c7e3e96ba35179d0ac78ab26
Created May 17, 2026 03:37
web-controller.html for controlling arduino from phone
<!doctype html>
<html>
<body>
<h1>Arduino Nano ESP32 Control</h1>
<button onclick="connectBLE()">1. Connect to Arduino</button><br /><br />
<button onclick="sendData(1)">Turn LED ON</button>
<button onclick="sendData(0)">Turn LED OFF</button>
<p id="status">Status: Disconnected</p>
<script>
(kicad_pcb
(version 20260206)
(generator "pcbnew")
(generator_version "10.0")
(general
(thickness 1.6)
(legacy_teardrops no)
)
(paper "A4")
(layers
(kicad_sch
(version 20260306)
(generator "eeschema")
(generator_version "10.0")
(uuid "0d35483a-0b12-46cc-b9f2-896fd6831779")
(paper "A4")
(title_block
(date "2026-04-24")
)
(lib_symbols