Skip to content

Instantly share code, notes, and snippets.

View floitsch's full-sized avatar

Florian Loitsch floitsch

View GitHub Profile
import net
import net.wifi
CREDENTIALS ::= [
[ "ssid1", "password" ],
[ "ssid2", "password" ]
]
attempt-connection [block] -> bool:
network/net.Interface? := null
@floitsch
floitsch / broadcaster.toit
Created January 29, 2023 02:48
Example for how to use UDP broadcast to communicate between devices.
/*
Zero-Clause BSD License
Copyright (C) 2023 Toitware ApS
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND