I hereby claim:
- I am todbot on github.
- I am todbot (https://keybase.io/todbot) on keybase.
- I have a public key whose fingerprint is AAB5 37CE B4D8 4DC1 1571 D47E 74B1 4B82 CFFF 63C5
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| bokbokbok% bossac -i -p /dev/tty.usbmodem14121 | |
| Atmel SMART device 0x10010005 found | |
| Device : ATSAMD21G18A | |
| Chip ID : 10010005 | |
| Version : v1.1 [Arduino:XYZ] Jan 17 2017 22:26:41 | |
| Address : 8192 | |
| Pages : 3968 | |
| Page Size : 64 bytes | |
| Total Size : 248KB | |
| Planes : 1 |
| // lsusb-verbose.js | |
| // | |
| // Slightly fixed version of https://github.com/schakko/node-usb/blob/master/examples/lsusb/lsusb.js | |
| // for https://github.com/tessel/node-usb | |
| // | |
| // Rework by Tod E. Kurt / todbot.com | |
| // | |
| var usb = require('usb') |
| todbot@vbubuntu:~/projects/tmp$ git clone https://github.com/todbot/electron-hid-toy | |
| todbot@vbubuntu:~/projects/tmp$ cd electron-hid-toy | |
| todbot@vbubuntu:~/projects/tmp/electron-hid-toy$ npm install | |
| todbot@vbubuntu-blink1dev:~/projects/tmp/electron-hid-toy$ npm run build | |
| > electron-hid-toy@0.1.5 build /home/todbot/projects/tmp/electron-hid-toy | |
| > build | |
| electron-builder 19.36.0 |
Below are two ways to run blink1-tool to control blink(1) on a Chromebox via the command-line.
To get a command-line, you need to enable developer mode on the Chromebox.
sudo mkdir -p /usr/local/bin
cd /usr/local/bin
curl -OL https://github.com/todbot/blink1/releases/download/v1.98a/blink1-tool-v1.98a-linux-x86_64.zip
sudo unzip blink1-tool*zip
sudo /usr/local/bin/blink1-tool --blink 3
This pattern has only two lines: a color and off.
The result if played on repeat is a flashing.
echo "making pattern"
blink1-tool -m 500 --rgb ff00ff --setpattline 0
blink1-tool -m 500 --rgb 000000 --setpattline 1The --play commands takes three args: play/stop (1/0), start position, end position.
| // hidapi-enum-tst.c -- Demonstrate enumerating | |
| // | |
| // Build with: (assumes you have checked out 'hidapi' into a side directory) | |
| // Mac: | |
| // gcc -I ../hidapi/hidapi ../hidapi/mac/hid.c -framework IOKit -framework CoreFoundation hidapi-enum-tst.c -o hidapi-enum-tst | |
| // Linux (hidraw): | |
| // gcc -I ../hidapi/hidapi ../hidapi/linux/hid.c -ludev hidapi-enum-tst.c -o hidapi-enum-tst | |
| // Linux (libusb): | |
| // gcc -I ../hidapi/hidapi -I /usr/include/libusb-1.0 ../hidapi/libusb/hid.c -lpthread -lusb-1.0 hidapi-enum-tst.c -o hidapi-enum-tst | |
| // |
Here's one way to program a Tomu (https://tomu.im/) or EFM32 chip using a cheap $8 ST-Link V2 programmer
Install OpenOCD - http://openocd.org/
e.g. on Mac OS X: brew install openocd
Create a file called "~/openocd-stlinkv2-efm32.cfg" that contains:
| # What is our setup | |
| pi@raspberrypi:~ $ cat /etc/debian_version | |
| 9.4 | |
| pi@raspberrypi:~ $ lsb_release --all | |
| No LSB modules are available. | |
| Distributor ID: Raspbian | |
| Description: Raspbian GNU/Linux 9.4 (stretch) | |
| Release: 9.4 | |
| Codename: stretch |
| /* Basic Raw HID Example | |
| Teensy can send/receive 64 byte packets with a | |
| dedicated program running on a PC or Mac. | |
| You must select Raw HID from the "Tools > USB Type" menu | |
| Optional: LEDs should be connected to pins 0-7, | |
| and analog signals to the analog inputs. | |
| This example code is in the public domain. |