Wedding Projecting with the Raspberry Pi pt.2

Parts 1 | 2

So, at the end of part 1, we had a mostly set up Pi for day to day use. Being that this Pi, specifically, is going to be for a very particular day’s use, we need to make some changes.

  • Issue ‘sudo raspi-config’ and navigate to ‘Boot Options’
    • Select ‘Desktop/CLI’ then ‘Console Autologin’

Excellent! Now we don’t have to worry about anything ever again. We did it, guys!

I have chosen to go with the wonderful servo control baked into PiGPIO and the author[s] of that deserve a MASSIVE shoutout!

PiGPIO is an absolute MONSTER of a timesaver when it comes to controlling servos (and many other types of electronics) because it handles timing and math for us, and it integrates beautifully into python, which we will be using for both reading our keypad and all logic associated with locking/unlocking.

With that said, lets go about getting it installed.

Installing PiGPIO

From a terminal of your choice, in my case SSH, issue the following commands:

  • rm pigpio.zip
  • sudo rm -rf PIGPIO
  • wget abyz.co.uk/rpi/pigpio/pigpio.zip
  • unzip pigpio.zip
  • cd PIGPIO
  • make
  • sudo make install

Be patient with the install process. According to the creator, the initial part of the make will take 100 seconds+ on older Pis

Once that is said and done, ensure the PiGPIO daemon is set to start on boot:

  • find the location of the PiGPIO daemon by issuing ‘whereis pigpiod’
  • issue ‘sudo crontab -e’ to edit the root crontab
    • If you haven’t selected a preferred editor, do so now. I prefer nano.
  • add the following at the bottom of the file:
  • @reboot    /usr/local/bin/pigpiod
  • CTRL+o -> Enter to save changes
  • CRTL+x to exit
  • issue ‘sudo reboot’ to reboot and test everything
  • After reboot, issue ‘ps -ef | grep pigpiod’ to make sure it started on reboot
    • Yay!

Coming in part 3:

Utilizing PiGPIO and Python to control Servos for profit and success!

One Reply to “Wedding Projecting with the Raspberry Pi pt.2”

Leave a Reply

Your email address will not be published. Required fields are marked *