Skip to content

marinasundstrom/Iot-RPi-Sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blink

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

Requirements

  • .NET Core 3.1 SDK
  • Visual Studio 2019 or VS Code
  • SSH

Setup Raspberry Pi

  1. Download Raspbian Lite from here
  2. Flash it onto a SD card with a tool like balenaEtcher

Headless setup

To make a headless setup:

  1. Mount the SD card to your computer
  2. To enable SSH, create an empty file ssh in /boot partition.
touch /Volumes/boot/ssh #macOS
  1. 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.

  1. Eject the SD card and mount it to the Raspberry Pi.
  2. Start the RPi

Set up Raspbian

Open a terminal (or console):

Default password: raspberrypi

Change password

It is recommended that you change the password.

passwd

This is especially important if the device is on a public network.

Configure Raspbian

Launch raspi-config:

sudo raspi-config
Enable SPI

Go to Interfacing Options, and choose P4 SPI.

Enable this option.

Expand file system

Go to Advanced, and choose A1 Expand Filesystem [...].

A restart is required.

Deploying app

Deploy a self-contained app by running a suitable publish script.

Modify the script with the credentials necessary to logon to your Raspberry Pi.

Debugging app

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.

External links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages