A playground for programs targeting .NET Core 3.1 on Raspberry Pi, running Rasbian.
Based on the dotnet/iot
bindings.
Containing:
- RGB LED
- RFID reader
- .NET Core 3.1 SDK
- Visual Studio 2019 or VS Code
- SSH
- Download Raspbian Lite from here
- Flash it onto a SD card with a tool like balenaEtcher
To make a headless setup:
- Mount the SD card to your computer
- To enable SSH, create an empty file
ssh
in/boot
partition.
touch /Volumes/boot/ssh #macOS
- To set up Wi-Fi, create a file
wpa_supplicant.conf
in/boot
with content:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="NETWORK-NAME"
psk="NETWORK-PASSWORD"
}
Substitute ssid
and psk
with the details of your network configuration.
- Eject the SD card and mount it to the Raspberry Pi.
- Start the RPi
Open a terminal (or console):
Default password: raspberrypi
It is recommended that you change the password.
passwd
This is especially important if the device is on a public network.
Launch raspi-config:
sudo raspi-config
Go to Interfacing Options
, and choose P4 SPI
.
Enable this option.
Go to Advanced
, and choose A1 Expand Filesystem [...]
.
A restart is required.
Deploy a self-contained app by running a suitable publish
script.
Modify the script with the credentials necessary to logon to your Raspberry Pi.
You can debug the app from VS Code using the included launch configurations. You must probably install the Visual Studio Debugger also
Visual Studio 2019 supports Remote Debugging through SSH.
I have tested it without having the Visual Studio Debugger installed.