pi-top [4] .NET Core SDK with .NET Interactive Extensions
Check out dotnet/iot for loads of device bindings!
To install and configure your pi-top [4] with .NET Core SDK support, run this from your pi-top:
pi@pi-top:~ curl -L https://raw.githubusercontent.com/pi-top/pi-top-4-.NET-SDK/master/setup.sh | bash
pi@pi-top:~ source ~/.bashrc
Note: you should be able to re-run this at a later date to update.
After this, you will want to update your environment variables. Either start a new terminal instance, or run:
pi@pi-top:~ source ~/.bashrc
To use xbox controller via bluetooth run this from the pi-top:
pi@pi-top:~ curl -L https://raw.githubusercontent.com/pi-top/pi-top-4-.NET-SDK/master/setup-xbox-controller.sh | bash
Then reboot the pi-top for the changes to take effect.
Once executed, you will have this repo cloned at
/home/pi/pi-top-4-.NET-SDK
The code is compiled and the latest NuGet packages are located at
/home/pi/localNuget
Open VScode and add the .NET interactive extension. Now you can use .NET Interactive notebooks directly on your pi-top.
The src
directory contains the code for libraries you can use to create .NET Core apps for the amazing pi-top4 platform. Get one and get creative.
Requires .NET Core SDK 5.0 LTS for ARM32
The libraries comes along with dotnet interactive
integration so you can use notebooks to explore the power of pi-top.
- install the
dotnet interactive
tool as shown here - install Camera library dependencies
To use the notebook samples in examples/vs-code
, you will need vs-code and vs-code extension on your local machine
- install vscode extension
Build the libraries and packages
- build the project
> dotnet build
- if you do not have it, create the folder
/home/pi/localNuget
- pack the projects with
> sh tools/pack.sh 1.1.1
it will package the project into the/home/pi/localnuget
using version 1.1.1
Note: persistent issues during nuget restore
could be related to ca-certificates.conf
issues. Installing the latest version of pi-topOS/Raspberry Pi OS should fix this. Follow the instructions on the pi-top knowledge base to reinstall the latest available version.