Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #37 from anmenaga/WiringPiCodes
Browse files Browse the repository at this point in the history
Added docs about WIRINGPI_CODES environment variable
  • Loading branch information
anmenaga authored Apr 25, 2018
2 parents 329928f + d28b684 commit 325fff0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ a pin based GPIO access library written in C.
You can grab the latest version of PowerShell IoT by running:

```powershell
sudo pwsh
sudo WIRINGPI_CODES=1 pwsh
Install-Module Microsoft.PowerShell.IoT
```

Expand Down Expand Up @@ -133,9 +133,14 @@ _NOTE: If you'd rather not use the script, simply copy the `out/Microsoft.PowerS
First, you must run pwsh with sudo:

```powershell
sudo pwsh
sudo WIRINGPI_CODES=1 pwsh
```

##### About `WIRINGPI_CODES` environment variable

`Microsoft.PowerShell.IoT` module internally uses [WiringPi library](http://wiringpi.com/reference/setup) which has a default behavior of terminating current process (in this case - PowerShell) even on non-critical errors in setup functions.
To avoid such crashes define `WIRINGPI_CODES` environment variable either when starting PowerShell (see example above) or through configuration scripts - example for an interactive login shell - `echo "export WIRINGPI_CODES=1"|sudo tee -a /etc/profile.d/WiringPiCodes.sh`

If you have the `Microsoft.PowerShell.IoT` module in your PSModulePath:

```powershell
Expand Down

0 comments on commit 325fff0

Please sign in to comment.