There are two methods that we can use to provide an internet connection to the Raspberry Pi:
An Ethernet cable: The Raspberry Pi 3B+ contains an Ethernet port. To provide an internet connection via an Ethernet port, simply connect an Ethernet cable to it.
Wi-Fi: Connecting the Raspberry Pi over Wi-Fi is also pretty straightforward. Click on the Wi-Fi icon in the taskbar. Select your Wi-Fi network, enter the correct password, and the Raspberry Pi will connect to the desired Wi-Fi network:
After setting up the Raspberry Pi 3B+ as a desktop computer, we can simply open any code editor and start writing programs to control motors or LEDs with the Raspberry Pi.
Since we are going to create a movable robot using the Raspberry Pi, however, the desktop computer setup will not work. This is because the display, the keyboard, and the mouse, all of which are attached directly to the Pi, will limit its movement. In the next section, to be able to use it without these peripherals, we'll look at how to connect the Raspberry Pi 3B+ wirelessly to a laptop via Wi-Fi.