PiFace Digital 2 on a Rasberry PI 2 and Windows 10 IoT

Story

OK, so continueing my the series on PI 2 with windows 10 for IoT, I decided to create a demo app for the PiFace Digital 2, there where no libraries for the primary chip on the board. The MCP23S17 SPI to 16 pin expander so I wrote my own, then put a cool UI ontop of it so I can play with the board under Windows 10.  The UI was based in spirit on the original emulator from http://www.piface.org.uk/products/piface_digital/. I copied no code and simply replicated the functionality but with my own design UIpiface digital 2 on a rasberry pi 2 and windows 10 iot

Element14 where kind enough to send me the gear so forgive my showcasing their name, they deserve it.

You can use it by simply clicking on the relays (The graphics update to show the state of the contacts, the LED 0 through 7 or the 4 switches, they all work and actually drive the outputs (The switches simulate the button being pressed, im not that good !!) but if you short the input to ground it is happily recognized and reflected in the state of one of the green indicators. Pushing hte real switches also works.Both the Inputs and the Putputs are monitored every 200mS and the virtual LEDS (Red and Green) are updated based on the bit pattern found

The inputs have a weak 100K pullup on them to V+ so all you need is a switch to ground and they will work, the outputs are either open collector or one of the two relays.

It should also be noted that even though the default for the PiFace is that the green pins are inputs, there is nothing stopping he coder setting some as an output and extending the range of features. My library supports this, the UI does not yet. I may add this in a future versiondiagram piface digital 2 on a rasberry pi 2 and windows 10 iotSo this is a very short post as there is not a huge amount to say,, as its all int he software and the UI. you can download my Visual Studio project from here, you should be able to simply load it into Visual Studio Community edition and upload to your PI2 after seting its remote parameters of course

For more Detail: PiFace Digital 2 on a Rasberry PI 2 and Windows 10 IoT

About The Author

Scroll to Top
Read previous post:
windows 10 on the gopigo
Windows 10 on the GoPiGo

About the Project Now that the Windows 10 Insider Preview is available for those that have already signed up, the .NET...

Close