提交 9d25dfd4 编写于 作者: R Rich Lander

Add instructions to run led-blink sample

上级 a3c1da12
......@@ -2,7 +2,29 @@
This [sample](Program.cs) demonstrates blinking an LED at a given interval. It repeatedly toggles a GPIO pin on and off, which powers the LED. This sample also demonstrates the most basic usage of the [.NET Core GPIO library](https://dotnet.myget.org/feed/dotnet-corefxlab/package/nuget/System.Devices.Gpio).
### Code
## Run the sample
This sample can be built and run with .NET Core 2.1. Use the following commands from the root of the repo:
```console
cd samples
cd led-blink
dotnet build -c release -o out
sudo dotnet out/led-blink.dll
```
## Run the sample with Docker
This sample can be built and run with Docker. Use the following commands from the root of the repo:
```console
cd samples
cd led-blink
docker build -t led-blink .
docker run --rm -it -v /sys:/sys led-blink
```
## Code
The following code provides write access to a GPIO pin (GPIO 17 in this case):
......@@ -25,7 +47,7 @@ while (true)
}
```
### Breadboard layout
## Breadboard layout
The following [fritzing diagram](rpi-led.fzz) demonstrates how you should wire your device in order to run the [program](Program.cs). It uses the GND and GPIO 17 pins on the Raspberry Pi.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册