Introduction: How to Add 6 Extra Pins to Your Arduino With No Extra Hardware
Hello, this is my second Instructable so please bear with me.
I am going to tell you how to get 6 extra Arduino digital pins.
I discovered this by playing with the Arduino IDE and tried setting up a LED on pin 14 (which does not exist on the board) And guess what? Analog pin 0 is pin 14!
Step 1: How to Get the Other Analog Inputs Working Too
It is pretty simple to get the others working too! Here is a list of all of the pins:
Pin 14 = Analog in 0
Pin 15 = Analog in 1
Pin 16 = Analog in 2
Pin 17 = Analog in 3
Pin 18 = Analog in 4
Pin 19 = Analog in 5
Unfortunately these are not PWM pins, but you can use the SoftPWM library to get software-based PWM, which is almost as good as native PWM.
Step 2: The Example Code
Here is just an example code i wrote for testing:
int ledPin = 14;
int gndPin = 15;