My Raspberry PI Setup

Whenever I get a new Raspberry PI to setup I have to go through the same motions every time. Time for a post to remind myself exactly what steps I go through to get that perfect setup.

Disclaimer: This is MY idea of a good setup, if you like it follow along, if not. Go have a soda pop!

Tasks

Install Raspbian on SD Card

  • Grab Rasbian image from raspberrypi.org
  • Download Etcher (if you don’t have it)
  • Follow etcher directions to write image from raspberrypi.org to your SD card.

Configure headless options

In this section we need to create a couple of files on the boot partition of the SD card we just created. The first file called ssh will enable ssh, the second file wpa_supplicant.conf will configure wifi.

  • Open the boot filesystem on your computer
  • Create an EMPTY file called ‘ssh’. Do not allow any file extensions. If you are unsure how to do that, google ‘show file extensions’
  • Create another file called wpa_supplicant.conf and put the following in it.
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="NETWORK-NAME"
    psk="NETWORK-PASSWORD"
}
  • Save that file
  • Eject SD Card
  • Cram it in Raspberry PI
  • Boot the pi.
  • You should be able to find the IP address by rooting around through your router.

Login

If that all went well, we can now log into the raspberry pi.

  • Use your favorite ssh client / terminal. On windows mine is Putty. For mac os and linux (or any unix variant) you can most likely just use a a terminal for this. Google “how to ssh into a linux computer”
  • Default user name is: pi
  • Default password is: raspberry

Configure pi with built in utility

We will use the raspi-config utility to configure some basic options.

  • Run sudo raspi-config
  • Change User Password
  • Network Options -> Hostname
  • Localization Options -> Change Locale (Dont forget to deselect the default en GB setting
  • Localization Options -> Change Timezone
  • Localization Options -> Keyboard Layout
  • Advanced Options -> Expand Filesystem
  • Finish (A reboot will be required)

Upgrade and Upgrade

Here we make sure that the pi is as up to date as possible before starting a project.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

Install Packages

Install basic packages that I use all the time.

  • Build Essentials
    • sudo apt-get install build-essential
  • GIT
    • sudo apt-get install git
  • VIM
    • sudo apt-get install vim
  • SMASH (this is my own custom setting BS that I have had on every unix type box I have worked on for decades.
    • git clone https://github.com/KalebClark/smash.git ~/.smash
    • cd ~/.smash
    • ./install.sh

DIY ATX Bench Power Supply

We build a bench top power supply from an ATX computer power supply. These bench top power supplies can provide quite a bit of current at 3.3, 5, and 12 volts. We 3d printed a panel that houses a switch to turn the unit on, a switch to silence the fan, an indicator LED and three sets of terminals for the three voltages mentioned above.

3D Printing Star of Life

My son is now an EMT and I thought I would make something for him to celebrate. I found an SVG of the “star of life” and imported into fusion360, made some tweaks and printed it in 4 colors. The model will be available on Thingiverse on 12/27/2018. I just created a thingiverse account for MD, and its making me wait 24 hours before I can publish. Check the link on the 27th if you want the models!

How to Modify Servo for Continuous Rotation

Learn how to modify a standard servo for continuous rotation! In this video we cover removing the physical stop and replacing the potentiometer with static resistance. We also have a look at the code needed on Arduino & Raspberry PI, as well as how to calibrate your code for your newly modified Servo!