mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* espruino added type for wifi module for access point * espruino added myself to definitions * changed tabsize to 4 * espruino: added boolean to digitalwrite
18 lines
422 B
TypeScript
18 lines
422 B
TypeScript
import * as wifi from 'Wifi';
|
|
|
|
wifi.connect('ssid', { password: 'pass', authMode: 'wpa_wpa2' }, err => {
|
|
if (err) throw err;
|
|
console.log('connected');
|
|
});
|
|
|
|
wifi.startAP('ssid', { password: 'pass', authMode: 'wpa_wpa2' }, err => {
|
|
if (err) throw err;
|
|
console.log("created");
|
|
});
|
|
|
|
digitalWrite(D2, false);
|
|
digitalWrite(D2, true);
|
|
|
|
I2C1.setup({ scl: D4, sda: D0 });
|
|
Serial2.setup(9600, { rx: D16, tx: D17 });
|