Skip to content

Instantly share code, notes, and snippets.

View nischelwitzer's full-sized avatar
🎯
Focusing all the time

Alexander Nischelwitzer nischelwitzer

🎯
Focusing all the time
View GitHub Profile
@dougalcampbell
dougalcampbell / ds-duino.ino
Created September 10, 2013 17:37
Digispark and nodejs - talking to the Digispark Arduino-compatible microcontroller via USB with the node-hid library
/*
* Accept control commands via USB.
*
* Commands start with '!' and end with '.'
* Commands have three parts: action, pin, value: !AAPPVV.
*
* E.g. '!01p101.' is DigitalWrite, Pin1, value = 1
*
* Note: This is currently *very* crude. Much improvement could be made.
* I think the use of strncpy is eating a lot of memory. Refactor?