Skip to content

Instantly share code, notes, and snippets.

View mitchellgu's full-sized avatar

Mitchell Gu mitchellgu

View GitHub Profile
@mitchellgu
mitchellgu / Agent
Created November 16, 2014 11:48
Falangafone Electric Imp Code
http.onrequest(function(req, resp) {
if (req.path=="/update"){
if ("n" in req.query) {
local currentSong = req.query["n"].tointeger();
device.send("led0", currentSong % 2);
device.send("led1", currentSong/2 % 2);
device.send("led2", currentSong/4 % 2);
device.send("led3", currentSong/8 % 2);
device.send("led4", currentSong/16 % 2);
}

Keybase proof

I hereby claim:

  • I am mitchellgu on github.
  • I am mitchgu (https://keybase.io/mitchgu) on keybase.
  • I have a public key whose fingerprint is 7B0C 1CFB EFB5 5910 B524 A9B8 EAE9 0127 F227 DE08

To claim this, I am signing this object: