Hello, Raspberry Pi
- Visual Studio 2022
- Visual Studio Code
Step 1 - Install .NET Runtime
Download and install the latest version of the .NET runtime.
Step 2 - Install Visual Studio
Download and Install Visual Studio 2022 for Windows to prepare your development machine. Community edition will work fine.
Step 3 - Install Meadow Project Templates
Open a console window and enter the following command to install a list of Meadow project templates:
dotnet new install WildernessLabs.Meadow.Template
When installed, you’ll see a list of templates available:
The following template packages will be installed:
WildernessLabs.Meadow.Template
Success: WildernessLabs.Meadow.Template::1.8.0.1 installed the following templates:
Template Name Short Name Language Tags
----------------------- ------------------ -------------- -------------------
Meadow Core-Compute App meadow-ccm [C#],F#,VB.NET Meadow/Console
Meadow Desktop App meadow-desktop [C#] Meadow/Console
Meadow F7 Feather App meadow-feather [C#],F#,VB.NET Meadow/Console
Meadow Jetson Nano App meadow-jetson-nano [C#] Meadow/Console
Meadow Library meadow-library [C#],F#,VB.NET Meadow/Library
Meadow Project Lab App meadow-project-lab [C#] Meadow/Console
Meadow Raspberry Pi App meadow-rpi [C#] Meadow/Console
Meadow reTerminal App meadow-reterminal [C#] Meadow/Console
Meadow StartKit App meadow-startkit [C#] Meadow/App/StartKit
Step 4 - Add VS Linux Debugger Studio Extension
Open Visual Studio’s Extensions Manager and install the VS Linux Debugger Extension.
Make sure you go through their Getting Started instructions to properly configure the target device (Raspberry Pi) and how to use the extension to build and deploy the Meadow.Linux application over the network.
Step 5 - Create your first Meadow application
In Visual Studio, open the Create a new project window. When you search for Meadow, you will see a list of project templates, click on Meadow.Linux Raspberry Pi App (Wilderness Labs):
This is a minimal Meadow.Linux application that it'll output a few strings on a terminal to confirm the application is running correctly.
Step 6 - Deploy your application
Once the application is deployed successfully, open a terminal on the Raspberry Pi and go to inside the project's folder and type:
dotnet [Your Project Name].dll
The terminal will output a few console output strings ending with Hello, Raspberry Pi!
.
Initializing OS...
Using default app.config.yaml...
Log level: Information
Platform does not support gpiod
Update Service is disabled.
Health Metrics disabled.
Initialize...
Run...
Hello, Raspberry Pi!
Step 7 - Check out additional samples
You can check more samples in our Meadow.Samples GitHub repo.
Step 1 - Install .NET Runtime
Follow this blog post to download and install .NET on a Raspberry Pi.
Step 2 - Install Visual Studio Code
Download and Install Visual Studio Code to prepare your development machine.
Step 3 - Install Meadow Project Templates
Open a console window and enter the following command to install a list of Meadow project templates:
dotnet new install WildernessLabs.Meadow.Template
When installed, you’ll see a list of templates available:
The following template packages will be installed:
WildernessLabs.Meadow.Template
Success: WildernessLabs.Meadow.Template installed the following templates:
Template Name Short Name Language Tags
----------------------- ------------------ -------------- -------------------
Meadow Core-Compute App meadow-ccm [C#],F#,VB.NET Meadow/Console
Meadow Desktop App meadow-desktop [C#] Meadow/Console
Meadow F7 Feather App meadow-feather [C#],F#,VB.NET Meadow/Console
Meadow Jetson Nano App meadow-jetson-nano [C#] Meadow/Console
Meadow Library meadow-library [C#],F#,VB.NET Meadow/Library
Meadow Project Lab App meadow-project-lab [C#] Meadow/Console
Meadow Raspberry Pi App meadow-rpi [C#] Meadow/Console
Meadow reTerminal App meadow-reterminal [C#] Meadow/Console
Meadow StartKit App meadow-startkit [C#] Meadow/App/StartKit
Step 4 - Create your first Meadow application
Lets verify everything is set up by deploying your first Meadow application.
Open VSCode and in a new Terminal within, enter the following command to create a new Meadow.Linux project that will run on your Raspberry Pi:
dotnet new meadow-raspberry-pi --name RaspberryPiDemo
This Meadow.Linux application shows a basic Meadow app structure with an Initialize
and Run
methods with logging strings to confirm in the output the application ran successfully.
Step 5 - Run a Meadow Application
Lets run this application as is on your Raspberry Pi. In a terminal inside the project folder, build the project with the command:
dotnet build
And finally to run the Meadow application, use the command:
dotnet run
At that point, you should see the application’s output in the console and the RGB LED cycling through different colors:
Log level: Information
Platform does not support gpiod
Update Service is disabled.
Health Metrics disabled.
Initialize...
Run...
Hello, Raspberry Pi!
Step 6 - Check out additional samples
You can check more samples in our Meadow.Samples GitHub repo.