Skip to content

Connecting to the Pi

Nam Tran edited this page May 24, 2017 · 4 revisions

Connecting to the Raspberry Pi is a relatively simple process. Regardless of operating system, you should connect the Raspberry Pi with an Ethernet cable to the computer you are using. From there, the process is slightly different by operating system. Once connected, you can SSH into the Raspberry Pi with the address pi@robotics-pi.local.

Bluetooth

gwrobolib has the ability to use a gamepad connected to a computer with Python installed using the Pi 3's built-in Bluetooth. To get this functionality, the following steps should be taken:

  1. Ensure the Pi has the correct packages installed by running sudo apt-get install bluez minicom
  2. Disable PNAT by running sudo nano /etc/Bluetooth/main.conf then adding the following line near the top: DisablePlugins = pnat
  3. Make the Pi discoverable by typing sudo hciconfig hci0 piscan
  4. Pair the Pi with the computer
  5. Change directories to the gwrobolib directory and run ./connect-controller.sh At this point you can run minicom -D /dev/rfcomm0 and check using a Bluetooth terminal that the devices are connected and sending information back and forth.

Optional: To make the Pi search for the driver station on startup, run sudo nano /etc/rc.local and add the following lines:

printf "Adding SPP and listening on rfcomm0\n"
sdptool add sp; rfcomm listen hci0 > /dev/null 2>&1 &
  1. Run the serialdriverstation.py script from the computer with the gamepad plugged in

Windows

Windows does not come with the SSH command line tool, so you will need to download PuTTY. SSH will allow you to access the Raspberry Pi command line.

For file transfer, it is easiest to download WinSCP. After you have it downloaded, select New Site. The settings should be as follows:

  • File protocol: SFTP
  • Host name: robotics-pi.local
  • Port number: 22
  • User name: pi
  • Password: robotics

Once connected, you can drag between one directory into another using the WinSCP GUI.

Connecting to Internet

Once you are connected via Ethernet cable, you can use your computer's Wi-Fi connection as the Raspberry Pi's internet connection. To do this, the steps are as follows:

  1. Right-click your Wi-Fi icon on the taskbar.
  2. Select Open Network and Sharing Center.
  3. Select Change adapter settings from the left sidebar.
  4. Right-click your Wi-Fi adapter (probably is named Wi-Fi).
  5. Select Properties then the Sharing tab.
  6. Select Allows other network users to connect through this computer's Internet connection.
  7. Under Home networking connection, select Ethernet.

Mac

TODO: Write Mac instructions...

Clone this wiki locally