.. _helpful: Helpful Stuff ============= Using Pimoscope --------------- Automate on bootup ^^^^^^^^^^^^^^^^^^ The RaspberryPi can automate a cron job to run :mod:`pimoscope` when rebooting. This is helpful because you only need to power the RaspberryPi without the need to ``SSH`` into the RaspberryPi and type command line instructions. Use ``crontab -e`` to edit the cron file, and ``crontab -l`` to view. Be sure to use full path to the virutalenv where you have installed :mod:`pimoscope`, in the example below the full path is ``/home/pi/Software/ENV``:: @reboot sleep 60 && . /home/pi/Software/ENV/bin/activate && pimo ate Agent on Raspberry Pi ^^^^^^^^^^^^^^^^^^^^^ :mod:`pimoscope` can also run :mod:`knilb` on the Raspberry Pi:: (ENV) pi@raspberrypi:~/try-pimo $ pimo ate -c http://app.knilb.com Using Raspberry Pi ------------------ The Raspberry Pi foundation has created an ecosystem of hardware that can easily be used as Automated Test Equipment. However, getting started can be overwhelming if you are new, and full of fun diversions if you are familiar. This page is a reference for what you'll need to get going using a **headless** Raspberry Pi. What hardware to use ^^^^^^^^^^^^^^^^^^^^ Raspberry Pi 3 Model B+ and a case, too. SD card with NOOBS for a clean installation of Raspbian OS. NOOBS is an acronym for New Out Of the Box Software, and it is an installer for the OS. NOOBS greatly simplifies loading Raspbian. These cards are readily available to purchase from online stores like `Adafruit`_ and `Pimoroni`_ RaspberryPi OS (formerly Raspbian) is the official OS for Raspberry Pi. It is based on Debian and is a Linux based OS. You'll want to know a few basic `Linux commands`_. How to use GPIO ^^^^^^^^^^^^^^^ The Raspberry Pi has readily-available GPIO pins that can be used to make an Automated Test Equipment device. There are many software packages to expose the GPIO and the choices can become confusing. The recommended packages are listed here: Pimoroni provides well-documented compatible software for the ExplorerHAT and AutomationHAT. `Pimoroni on Github`_. GPIO Zero is recommended for use without Pimoroni hardware. It is well-documented and built by folks at the Raspberry Pi foundation. `GPIO Zero on Readthedocs`_ How to go Headless ^^^^^^^^^^^^^^^^^^ Headless means without a monitor, keyboard, or mouse; simply the Raspberry Pi connected to a network. .. tip:: Recommended to initially configure Raspbery Pi using a traditional setup using monitor, keyboard, and mouse. Then deploy as headless. This makes a few things easier. Raspbian does not enable SSH by default during installation of the OS, so remote access is not possible from a fresh install from NOOBS. Ethernet just use Ethernet. At some point WiFi sounds like a great idea. It is not when headless. Find IP address of Raspberry Pi from Laptop using `ping or nmap `_. Remotely login to Raspberry Pi from Laptop using `SSH `_. Copy files to Raspbery Pi from Laptop using `SCP `_. Helpful Linux commands ^^^^^^^^^^^^^^^^^^^^^^ `Linux commands`_ will be the way to control your Raspberry Pi when you log in remotely. Create a new user using `adduser `_ even though NOOBS creates a default user ``pi`` with password ``raspberry``. The default user ``pi`` will become a good reference if you muck up something. You may also need to run commands using ``sudo`` as `Root `_. Starting :mod:`pimoscope` from reboot using `cron `_. Not recommended to use ``systemmd`` or ``rc.local``. .. _Adafruit: https://www.adafruit.com .. _Pimoroni: https://shop.pimoroni.com/products/noobs-16gb-microsd-card .. _Linux commands: https://www.raspberrypi.org/documentation/linux/usage/commands.md .. _Pimoroni on Github: https://github.com/pimoroni .. _GPIO Zero on Readthedocs: https://gpiozero.readthedocs.io/en/stable/index.html