How To Use
Visit Siliconwaves's website
Features
Scaffolding Project Template: Easily create project templates for your Board development.
Board Manager: Manage your Board configurations and connections seamlessly.
Integration of Remote Debugger: Debug your C/C++, Python, and Node.js programs remotely on thes Board.
Upload and Execute Code on the Board: Upload your code to the Board and execute programs directly from VS Code.
Inbuilt Support for OpenWRT Toolchain: Utilize the OpenWRT toolchain directly within VS Code for streamlined development.
Server Debugging
This VS Code extension facilitates server debugging with boards for C/C++, Python, and Node.js programs.
Installation on board
Run the following command on the board to install server debugging dependency packages:
wget -4 https://siliconwavesdev.blob.core.windows.net/openwrt-script/openwrt-start-up.sh
chmod +x openwrt-start-up.sh
./openwrt-start-up.sh
Sample Program
LED Blinking for C
**Install and Check GPIO Drivers**
Navigate to the GPIO directory and ensure the GPIO drivers are working:
$ cd /sys/class/gpio/
$ ls
export gpiochip0 gpiochip64 unexport
$ echo 44 > export
$ ls
export gpio44 gpiochip0 gpiochip64 unexport
$ cd gpio44/
$ ls
active_low direction subsystem value
$ cat direction
in
$ cat value
1
Steps To Create LED Blinking C program
To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "LED Blink For C" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
Connect GPIO pin 40 to the positive terminal of the LED and link pin 6 (ground) to the LED's negative terminal.
This program initiates LED blinking at a 0.5-second interval.
LED Blinking for Python
Install and Check GPIO Drivers
Navigate to the GPIO directory and ensure the GPIO drivers are working:
$ cd /sys/class/gpio/
$ ls
export gpiochip0 gpiochip64 unexport
$ echo 44 > export
$ ls
export gpio44 gpiochip0 gpiochip64 unexport
$ cd gpio44/
$ ls
active_low direction subsystem value
$ cat direction
in
$ cat value
1
Steps To Create LED Blinking Python program
- To create a new project:
- Open Visual Studio Code.
* Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
* Choose "LED Blink For Python" from the available sample programs.
* Fill in the mandatory fields and click "Create Project."
* Click the "Debug Server", to initiate debugging on the board.
* Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
* Click F5 or Debug play button in the menu under the Debugger tab.
* The program will start executing and stop at the breakpoint where you placed it.
Connect GPIO pin 40 to the positive terminal of the LED and link pin 6 (ground) to the LED's negative terminal.
This program initiates LED blinking at a 0.5-second interval.
LED Blinking for Node
Install and Check GPIO Drivers
Navigate to the GPIO directory and ensure the GPIO drivers are working:
$ cd /sys/class/gpio/
$ ls
export gpiochip0 gpiochip64 unexport
$ echo 44 > export
$ ls
export gpio44 gpiochip0 gpiochip64 unexport
$ cd gpio44/
$ ls
active_low direction subsystem value
$ cat direction
in
$ cat value
1
Steps To Create LED Blinking Node program
To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "LED Blink For Node" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
Connect GPIO pin 40 to the positive terminal of the LED and link pin 6 (ground) to the LED's negative terminal.
This program initiates LED blinking at a 0.5-second interval.
Detect Button for Python
Steps To Create Detect Button Python program
- To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "Detect Button For Python" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
- Connect GPIO pin 37 to the positive terminal and connect the other terminal to ground. Then, perform a long press on the push button to initiate detection.
Detect Button in a Specified Time for Python
**Steps To Create Detect Button In Specified Time Python program**
- To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "Detect Button in a Specified Time For Python" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
- Connect GPIO pin 37 to the positive terminal and connect other terminal in ground. Then, perform a long press on the push button to detect in a Specified Time.
Buzzer Beep for Python
**Steps To Create Buzzer Beep Python program**
- To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "Buzzer Beep For Python" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
- Connect GPIO pin 18 to the positive terminal and connect other terminal in ground.Enter the cycle count.
GPS signal for Python
**Steps To Create GPS signal Python program**
- To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "GPS signal For Python" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
- Connect GPS VCC to pin 2 (5V), GPS GND to pin 6 (GND), GPS RX to pin 8 (TX), and GPS TX to pin 10 (RX) of the VisionFive board, then wait for 5 minutes to receive valid data.
PUD for Python
**Steps To Create PUD Python program**
- To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "PUD For Python" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
PWM for Python
**Steps To Create PWM Python program**
- To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "PWM For Python" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
- Connect GPIO pin 32 to the positive terminal and connect other terminal in ground.
Get IP Address Using LCD Display For Python
**Steps To Create Get IP Address Using LCD Display Python program**
- To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "Get IP Address Using LCD Display For Python" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
- We have soldered the LCD display with the IIC I2C Module Interface and connected it to the StarFive board:
- Connect the GND pin to StarFive pin 6.
- Connect the VCC pin to StarFive pin 4.
- Connect the SDA pin to StarFive pin 3.
- Connect the SCL pin to StarFive pin 5.
- After running the program, we can see the IP address of the board displayed on the LCD.
Metal Detection Using Proximity For Python
**Steps To Create Metal Detection Using Proximity Python program**
- To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "Metal Detection Using Proximity For Python" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
- Connect the proximity sensor:
- Connect the blue wire to GND (pin 6) on the StarFive board.
- Connect the brown wire (VCC) to pin 4 on the StarFive board.
- Connect the black wire to pin 40 on the StarFive board.
- Check that the proximity sensor detects metal when it is near the sensor.
Temperature Sensor For Python
**Steps To Create Temperature Sensor Python program**
- To create a new project:
- Open Visual Studio Code.
- Click the "siwaves" icon located at the activity bar(left navbar) of the Visual Studio Code and click "Create New Project".
- Choose "Temperature Sensor For Python" from the available sample programs.
- Fill in the mandatory fields and click "Create Project."
- Click the "Debug Server", to initiate debugging on the board.
- Now, the executable will be copied from the host machine to the board, and the debug server will start listening.
- Click F5 or Debug play button in the menu under the Debugger tab.
- The program will start executing and stop at the breakpoint where you placed it.
- Connect the Temperature sensor:
- Connect the GND pin to StarFive pin 6.
- Connect the VCC pin to StarFive pin 4.
- Connect the SDA pin to StarFive pin 3.
- Connect the SCL pin to StarFive pin 5.
- Check the temperature sensor every second during cycle 1.
| |