Skip to content

Instantly share code, notes, and snippets.

@wilberforce
wilberforce / main.js
Last active August 1, 2019 07:12
pid-controller for moddable
/*
* Copyright (c) 2019 Wilberforce
* pid-controller - Advanced PID controller based on the Arduino PID library
* Based on: Arduino PID Library - Version 1.0.1 by Brett Beauregard <br3ttb@gmail.com> brettbeauregard.com
*
* Copyright (c) 2016-2017 Moddable Tech, Inc.
*/
class PID {
@wilberforce
wilberforce / main.js
Created April 29, 2019 03:11
webthing-led
/*
* Copyright (c) 2018 Moddable Tech, Inc.
*
* This file is part of the Moddable SDK.
*
* This work is licensed under the
* Creative Commons Attribution 4.0 International License.
* To view a copy of this license, visit
* <http://creativecommons.org/licenses/by/4.0>.
* or send a letter to Creative Commons, PO Box 1866,
// Captive Portal - extending:
// https://gist.github.com/MaBecker/ae9dade26b44524e076ca19f5fd72fab
// Added form and post back to join network
var http = require('http');
var wifi = require('Wifi');
var dgram = require('dgram');
var dns_srv = dgram.createSocket('udp4');