Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
108 lines (74 sloc) 3.09 KB

Raspberry Pi

Command Line

Measure CPU Temperature:

/opt/vc/bin/vcgencmd measure_temp

Finding Hardware in Malaysia

I may have some spare hardware, just drop me a message.

I've confirmed these work

USB to TTL Serial Cable (macOS 10.14.6)


  1. Enable UART by default
    1. See instructions below
  2. Install macOS drivers
    1. Requires restarting computer
  3. Plug in leads, refer to
    1. Pin 2: Red, V_USB (Optional if not using USB Power)
    2. Blank
    3. Pin 6: Black, GND
    4. Pin 8: White, USB_RX
    5. Pin 10: Green, USB_TX
  4. Restart computer
  5. Plug in Raspberry Pi to USB Port
  6. Discover serial device: ls /dev/cu.*
    1. Mine was /dev/cu.usbserial
  7. Connect to device: sudo screen /dev/cu.usbserial 115200

Instructions adapted from

Raspbian Boot Config

Great to do this before booting the Pi for the first time.

File referred to here are inside the micro SD Card.

Enable SSH by default

Create empty file: /boot/ssh

Enable Wifi by default

Create file: /boot/wpa_supplicant.conf

{% code title="/boot/wpa_supplicant.conf" %}

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev


{% endcode %}

Enable UART by default

Append to: /boot/config.txt

{% code title="/boot/config.txt" %}


{% endcode %}



Using sudo raspi-config set your hostname to something memorable. For example, in my network I have

  • pi3
  • pi4

This allows me to easily do ssh pi@pi3.local

File Browser

Edit code via Visual Studio Code

{% hint style="danger" %} Editing code doesn't work with a Raspberry Pi Zero, because the armv6l architecture is not supported. Raspberry Pi 3 and Raspberry Pi 4 run armv7l. {% endhint %}

Browse files using SSHFS

You can’t perform that action at this time.