Add a few IO library examples #4384

merged 7 commits into from May 7, 2016


None yet
2 participants

gohai commented Apr 3, 2016

This adds an example using a 128x64 pixel OLED display (available for < $5 with free shipping on eBay, also on Adafruit), an example using an inexpensive 8-channel ADC, and an example showing how to use a digital pin and a capacitor to measure resistive (analog) sensors. (The Pi doesn't have any analog inputs, so this might come in handy.)

@gohai gohai added the io label Apr 19, 2016

gohai added some commits May 2, 2016

IO: Simulate on all unsupported platforms
Instead of throwing an exception early on, this makes it possible to test all other parts of sketches that make light use of the IO library. A warning is printed once after startup for those environments.

This was tested on OS X against all examples that come with the IO library. Note: x86 and x64 are technically supported platforms. If a user on those prefers to use simulation instead, it is necessary to call NativeInterface.alwaysSimulate() before any other IO library function.

@benfry benfry changed the title from IO library updates to Add a few IO library examples May 7, 2016

@benfry benfry merged commit 570d441 into processing:master May 7, 2016

@gohai gohai deleted the gohai:arm-next branch May 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment