Thursday, September 26, 2024

Raspberry Pi: Install development environment

I'm used to nice and powerful IDEs. I looked on Thonny IDE and decided to find a better approach to develop on the Raspberry Pi.  I found this video tutorial that helped me to setup VSCode to develop remotely on my car: How to set up remote development for the Raspberry Pi using Visual Studio Code

Setup IDE (VSCode)


Steps are simple
- Install VSCode
- Install Remote Development extension pack to VSCode
- Create a new SSH connection and connect to Raspberry Pi from VSCode
It will take some time for VSCode to install the server on the Pi machine. 

Clone Github repository

Click clone repository...
Provide github URL. I used https version of the repo I forked: https://github.com/szelenin/Adeept_AWR.git
Provide existing folder where to clone
 


Configure Git

In the terminal set user name and email for git:

git config --global user.name user name
git config --global user.email your@email.com

Commit and Push

Change smth and commit from the source control: 

Click Sync Changes button to push.

Run Python with sudo

add "sudo": true into launch.json


Intellij Keybinding

Install IntelliJ IDEA Keybindings plugin

Make Raspberry use whole SD card's space

I used the provided image for the car so maybe because of that my Raspberry didn't expand the file system on the first boot. I noticed this when I tried to install Python Extension. 
To fix this open the terminal and run raspi-config:

sudo raspi-config

Then select Expand Filesystem in the Advanced Options:

After the car restarts, connect again and see how much space on the device. From the terminal run df -H command.
 

No comments:

Post a Comment