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

Added docs about WIRINGPI_CODES environment variable #37

Merged
merged 1 commit into from
Apr 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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