How to write a program for your Raspberry Pi from your computer? In this course, we will learn how to use and connect your Raspberry Pi to Visual Studio Code via SSH.This will allow you to program on your Raspberry Pi directly from your computer.Visual Studio Code is an extensible code editor developed by Microsoft for Windows, Linux, macOS, and Raspberry Pi. It is used by most programmers and offers features like program debugging, syntax highlighting, intelligent code completion, and built-in Git support.You can customize the Visual Studio Code theme, keyboard shortcuts, preferences, and install extensions that add additional functionality. Download Visual Studio Code The first step is to download Visual Studio Code from the Microsoft website: Once Visual Studio Code is installed, you’ll be prompted to choose its background color theme: The next step is to install an extension to connect remotely to our Raspberry Pi.To do this, go to the left sidebar in Visual Studio Code and click on the squares icon (the last logo in the image).Then type remote in the search bar. Install Remote – SSH. Once installed, a new icon will appear below the squares icon — this is the Remote icon.By clicking it, you will see all the SSH configurations previously created in Visual Studio Code. Connecting the Raspberry Pi via SSH In this part, we will see how to connect your Raspberry Pi to Visual Studio Code via SSH.To do this, you need a Raspberry Pi connected to the same network as your computer.You will then need to know the IP address of your Raspberry Pi. Here are several ways to find it:Open a terminal on your Raspberry Pi and type the command ifconfig. Look for the IP address if you are connected via Wi-Fi or Ethernet.If you have the graphical version of Raspberry Pi OS, hover your mouse over the Wi-Fi or Ethernet icon to see your IP address.The IP address you are looking for usually starts with 192.168.XX.XXX.A typical example might be 192.168.01.104. The last option, if you haven’t installed Raspberry Pi OS yet, is to use the hostname you configured in the OS Customization settings just before flashing Raspberry Pi OS onto your microSD card. At the top bar in Visual Studio Code, to initiate a new connection after clicking on the Remote tab, you need to type: ssh your_raspberry_username@raspberry_ip_address Here, we used the hostname configured in the OS Customization settings, but you could also use the Raspberry Pi’s IP address, for example: ssh julien@192.168.01.104 Then enter the user account password: You are now connected to your Raspberry Pi! You have the option to open a directory on your Raspberry Pi using Open Folder.By clicking Open Folder, you will see in the toolbar all the directories contained in the connected user’s home folder (here, /home/julien): Once you select the Desktop folder, you can create a new file or open any files contained in the chosen directory. You can now open the file of your choice and start programming on your Raspberry Pi. Here is our program fichier_visual.py: Once the program is executed on the Raspberry Pi, you will see Arduino Factory displayed in the terminal: One last thing to know is that you have access to the Raspberry Pi terminal directly from Visual Studio Code.You can install libraries, update your board, and more.