Skip to content

Instantly share code, notes, and snippets.

View numpad0's full-sized avatar

numpad0

View GitHub Profile
@numpad0
numpad0 / SerialGamepad.ino
Last active December 13, 2017 01:58
SerialGamepad
// SerialGamepad: Takes serial input to set Joystick status
// for easy gamepad input on various platforms
// Command syntax:
// b0000000000000000 set buttons 1-16 to on or off
// a0128 0128 0128 set axes 0-2 to respective values, 0-1023
// Target:
// Arduino Leonardo, Micro, and compatible boards
#!/bin/sh
json=$(wget http://himawari8-dl.nict.go.jp/himawari8/img/D531106/latest.json -O - )
url=$(echo "$json" | sed -e s/^.........// -e 's/\".*$//' -e s/-/'\/'/g -e s/\ /'\/'/g -e s/://g)
base="http://himawari8-dl.nict.go.jp/himawari8/img/D531106/1d/550/"
suff="_0_0.png"