I have to use Raspberry Pi with Arduino on a mobile robot and access Raspberry Pi on a PC through WiFi. Is it possible? Please explain how to do it?
To access your RPi over the WiFi, you can use any SSH client like PuTTY.
Once you have established a connection between your RPi and computer, then you can control GPIOs through a TCP connection. Use Socket Library in Python for this. You have to set a static IP for your RPi though, and use it in your code. Hope it would help.
If you haven't yet connected your pi to wifi, follow this guide first.
If you are on Windows, then you will need to install an ssh client such as PuTTY.
If you are on MacOS or Linux, simply open a terminal and use the
ssh command. (
By default, raspberry pis flashed with raspbian have the hostname
pi, and password
You can operate your RPI via your computer’s Remote Desktop Connection app. You will need some access to your RPIs HDMI cable for a short time however, or access to it via SSH while setting up. And will obviously need to have network connection or WiFi connection.
Step 1 - Get IP address of RPI
Open Terminal and execute the following command:
(Note that this is with a capital I)
Step 2 – Install xRDP
Enter these commands into the terminal:
sudo apt-get install xrdp
(If it says the package does not exist, then enter this command):
sudo apt-get update
Step 3 - connect via Remote Desktop
- Start your operating systems Remote Desktop Client (if you are using Windows, open RDP Client)
- Enter IP address of your RPI.
- Click OK
- You will be taken to the XRDP login screen, unless you have already entered it into your Remote Desktop client before connecting (if that is the case, skip step 5).
- Enter the RPIs username and password and click “OK” You can now access your RPI via Remote Desktop!