Skip to main content

Connecting to a device

import type React from "React";

import { IHTTPConnection } from "@meshtastic/js";

export const Connection = (): JSX.Element => {
const connection = new IHTTPConnection();

const connect = (): void => {
void connection.connect({
address: "10.0.0.10",
fetchInterval: 3000
});
};

return <button onClick={connect}>Connect Bluetooth</button>;
};