Skip to content

Control of Raspberry Pi _old_

Matteo De Carlo edited this page Dec 6, 2016 · 1 revision

Control of Raspberry Pi

Connecting the power

There are two ways to power Raspberry Pi

  1. Plug in the power cable (Micro USB-B) into the power socket next to the HDMI port.
  2. Connect the battery to the GPIO pins.
    1. Red cable (+5V) to pin 2 or 4
    2. Black cable (ground) to pin 6, 9, 14, 20, 25, 30, 34 or 39

Logging in

Hostnames of the robots are robot-1, robot-2 and robot-3. To log in to robot-1:

ssh pi@robot-1
Password:

raspberry

If the hostname is not recognised:

  1. Check if you are connected to pinet Wi-Fi network.
  2. Try scanning the network using nmap
nmap -sP 192.168.1.*
and then ssh to a discovered IP address
ssh [email protected]

Enable the pigpio daemon

If running the scripts terminates with a following error:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Can't connect to pigpio on localhost(8888)

Did you start the pigpio daemon? E.g. sudo pigpiod

Did you specify the correct Pi host/port in the environment variables PIGPIO_ADDR/PIGPIO_PORT? E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888

Did you specify the correct Pi host/port in the pigpio.pi() function? E.g. pigpio.pi('soft', 8888)) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

the pigpio daemon is not started. Solution:

sudo pigpiod

if still you get an error, try (changing the way to access the GPIO)

sudo pigpiod -a1

Shutting down

Safest way for shutting down Raspberry Pi is with command:

sudo shutdown -h now

If you want to reboot, use

sudo shutdown -r now
_________________
/ Premature      \
| optimization   |
| is the root of |
| all evil.      |
|                |
\ -- D.E. Knuth  /
-----------------
    \   ^__^
     \  (oo)\_______
        (__)\       )\/\
            ||----w |
            ||     ||
Clone this wiki locally