Skip to content

Instantly share code, notes, and snippets.

@marplx
Last active May 1, 2019 20:23
Show Gist options
  • Save marplx/813c77e37a061418b94a0f6212ce4a2c to your computer and use it in GitHub Desktop.
Save marplx/813c77e37a061418b94a0f6212ce4a2c to your computer and use it in GitHub Desktop.
MacOSX Raspberry Pi Setup with SSH, WiFi, Autostarting NodeJS Script

Raspberry Pi

Download:

https://downloads.raspberrypi.org/raspbian_lite_latest

Format

  1. Open Disk Utility App
  2. Delete and format with FAT
  3. deactivate disk

Copy Image to SSD

  1. Find disk diskutil list
  2. copy sudo dd bs=1m if=/Users/mariusprivat/Downloads/2018-11-13-raspbian-stretch-lite.img of=/dev/rdisk3 conv=sync
  3. status control + T

Duration: ca. 1866465280 bytes in 296 secs (5min)

Configuration

WiFi

Place a file called wpa_supplicant.conf

country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
       ssid="yourssid"
       psk="yourpassword"
       key_mgmt=WPA-PSK
}
SSH

place a file with name ssh into the root folder

NodeJS

sudo apt-get update
sudo apt-get dist-upgrade
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v

Autostart Service

https://maker-tutorials.com/node-js-init-script-neustart-reboot-automatisch-starten-linux-raspberry-pi/

GPIO

Raspberry 2B/A+/B+ rpi_b_gpio_card_mikael-leven.png

Raspberry 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment