MCPcopy Create free account
hub / github.com/SpacehuhnTech/espwebtool / connectESP

Function connectESP

src/lib/esp.js:3–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import localforage from "localforage"
2
3const connectESP = async t => {
4 const esploaderMod = await window.esptoolPackage;
5 const e = await navigator.serial.requestPort();
6 return t.log("Connecting..."), await e.open({
7 baudRate: t.baudRate
8 }), t.log("Connected successfully."), new esploaderMod.ESPLoader(e, t);
9};
10
11const formatMacAddr = (macAddr) => {
12 return macAddr.map((value) => value.toString(16).toUpperCase().padStart(2, '0')).join(':')

Callers 1

clickConnectFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected