This repo contains a Visual Studio solution that demonstrates the possibilities of .NET Dev on the Raspberry Pi.
https://docs.microsoft.com/en-us/dotnet/iot/deployment
commands:
sudo visudo
and add :/home/pi/.dotnet to the secure_path
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/pi$
https://docs.microsoft.com/en-us/dotnet/iot/debugging?pivots=vscode
https://unosquare.github.io/raspberryio/
https://marketplace.visualstudio.com/items?itemName=vs-publisher-1448185.ConveyorbyKeyoti
https://www.dotnetcurry.com/aspnet-core/1480/aspnet-core-vuejs-signalr-app
https://edi.wang/post/2019/9/29/setup-net-core-30-runtime-and-sdk-on-raspberry-pi-4
I encountered several ways to control servos with with DotNet and the Raspberry Pi. The simplest one I learned of after I finished the solution that is in this repo. It is to use the library Iot.Device.Bindings in conjuction with System.Device.PWM . There is an Iot.Device.ServoMotor that has a constructor that allows you to bind to a GPIO pin and specify the range of the servo and the max and min PWM values for it. In this solution however, I used the low level approach of the Unosquare.RaspberryIO.Pi library, as well as tried using System.Device.Gpio .
Check out https://github.com/dotnet/iot => I wish I had found this before I spent time creating my own servo motor controller
https://docs.microsoft.com/en-us/dotnet/iot/tutorials/temp-sensor
https://docs.microsoft.com/en-us/samples/microsoft/windows-iotcore-samples/push-button/
https://github.com/unosquare/raspberryio
https://github.com/unosquare/raspberryio#interrupts-and-callbacks
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-8-using-a-servo-motor/software
https://raspberrypi.stackexchange.com/questions/53854/driving-pwm-output-frequency
https://www.jameco.com/Jameco/workshop/Howitworks/how-servo-motors-work.html
https://pinout.xyz/pinout/pin35_gpio19
install wiring pi and export GPIO pin so that it can be used by an app without "sudo" (Uno Sqaure Method):
http://wiringpi.com/the-gpio-utility/
Boot from USB for faster read and write speeds (Uses same bus as ethernet so not the best for Network intensive applications):
https://www.raspberrypi.org/forums/viewtopic.php?t=108400
e.g. A 32GB sd => 32GB .img => PiShrink() => 2gb .img=>.zip=>800Mb zipped .img! https://github.com/Drewsif/PiShrink