This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello there | |
how are you | |
i am wonderful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# play a multi-led pattern on a blink(1) using blink1-tool commandline program | |
blink1-tool --playpattern "3,#ff0000,0.3,1,#000000,0.3,2,#00ff00,0.3,1,#000000,0.3,2,#0000ff,0.3,0,#000000,0.3,0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Listen for favorite events | |
user_stream.on('favorite', function (eventMsg) { | |
if (eventMsg.target.screen_name = screen_name) { | |
console.log('@' + eventMsg.source.screen_name + ' has favorited a Tweet.'); | |
blinkFavorite(); | |
} | |
}); | |
// Listen for follow events | |
user_stream.on('follow', function (eventMsg) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// test-rawhid.c -- Demonstrate writing to Teensy running RawHID sketch | |
// On Mac, this will occasionally hang in hid_write() | |
// | |
// Build with: | |
// gcc -I ../hidapi/hidapi -framework IOKit -framework CoreFoundation../hidapi/mac/hid.c rawhid-test.c | |
// | |
// Tod E. Kurt / github.com/todbot | |
// | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bokbokbok% git clone https://github.com/todbot/electron-hid-toy.git | |
Cloning into 'electron-hid-toy'... | |
remote: Counting objects: 29, done. | |
remote: Total 29 (delta 0), reused 0 (delta 0), pack-reused 29 | |
Unpacking objects: 100% (29/29), done. | |
Checking connectivity... done. | |
bokbokbok% cd electron-hid-toy | |
bokbokbok% npm install | |
npm WARN prefer global npm@3.10.9 should be installed with -g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: CrashSpace Sign JSON parsing in Swift | |
import Cocoa | |
import Foundation | |
let urlString = "https://crashspacela.com/sign2/json/"; | |
let url = URL(string: urlString) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: CrashSpace Sign JSON parsing in Swift, using struct | |
import Cocoa | |
import Foundation | |
struct ButtonPress { | |
let id: String | |
let msg: String | |
let diff_mins: Int | |
let date: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: NEW CrashSpace Sign JSON parsing in Swift, using struct | |
// CrashSpace Sign JSON now returns an 'is_open' flag and a 'minutes_open' value | |
import Cocoa | |
import Foundation | |
struct ButtonPress { | |
let id: String | |
let msg: String | |
let diff_mins: Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
#define LEDPIN D4 | |
#define NUM_LEDS 5 | |
CRGB leds[NUM_LEDS]; | |
CRGB leds_virt[NUM_LEDS]; | |
const int led_map[NUM_LEDS] = { |
OlderNewer