Skip to content

Instantly share code, notes, and snippets.

@verticalgrain
Last active November 8, 2017 21:57
Show Gist options
  • Save verticalgrain/716c764a575e8d73688b6fc40c7334bb to your computer and use it in GitHub Desktop.
Save verticalgrain/716c764a575e8d73688b6fc40c7334bb to your computer and use it in GitHub Desktop.
C.H.I.P. Cheatsheet
// SSH over lan:
ssh [email protected]
OR:
ssh [email protected]
OR:
ssh [email protected]
// PASSWORD
chip
// Use NM to set up wifi
sudo nmtui
// SET UP NETWORKING VIA TERMINAL
// add the following to /etc/network/interfaces
// To join unsecured network (no password), leave out the wireless-key line
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-essid Your-Network-Name
wireless-key Your-Network-Password
// Process to make self starting node script on chip:
// Edit /etc/rc.local
// Use the absolute path to node. To find this path, run `which node`
// Make GPIO directory executable
sudo chmod +x /sys/class/gpio
// Make GPIO pins ready to use
// Create export file
fs.writeFile("/sys/class/gpio/export", "1013", function(err) {});
// Set direction to "out"
fs.writeFile("/sys/class/gpio/gpio1013/direction", "out", function(err) {});
// Set GPIO value to true
fs.writeFile("/sys/class/gpio/gpio1013/value", "1", function(err) {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment