The analog inputs I choose are: 1 photoresistor But you can choose any other analog device. The following picture shows the wiring between all components. The potentiometer is directly connected to the multiplexer on pin A0. All other analog pins are connected to ground. Moreover the pins VEE and E are also connected to ground. I split the code in two parts so that you can copy both and past in your Arduino IDE.
|Country:||Saint Kitts and Nevis|
|Published (Last):||4 June 2008|
|PDF File Size:||16.38 Mb|
|ePub File Size:||15.35 Mb|
|Price:||Free* [*Free Regsitration Required]|
Check out our How to Solder - Through-hole Soldering tutorial for help guiding that soldering iron! If you throw male headers onto the board In this example, S0, S1, and S2 are connected to Arduino pins 2, 3 and 4 respectively. This way, when the output is selected and "Z" goes high, the LED on that output will turn on. Upload it, and enjoy the cycling, breathing LEDs!
If you have not previously installed an Arduino library, please check out our installation guide. If you take nothing else from this example, that function may prove the most handy in your future multiplexing endeavors. As for the Y-pins, you can connect potentiometers , photocells , or create voltage dividers on all eight inputs. Connect the Multiplexer Breakout up to eight photocells to create a single-octave, touchless keyboard! In lieu of a collection of eight analog input devices, you can just use jumper wires to short the input pins to either VCC or GND.
That way you can at least prove to yourself that it works. Development environment specifics: Arduino 1. Toggle your inputs, or switch out some jumper wires to see the values change. But instead of writing out to the Z pin, we read from it.
Increase the Number of Analog Inputs with an Analog Multiplexer