Binary Number directly from Arduino I/O pins?
April 4, 2013
Hey guys, I know there has got to be a way to do this, but I can't seem to find it at the Arduino reference page and I don't seem to be using the correct google terms.
I have a 4-bit parallel output from a chip going to 4 digital input pins on an arduino. The chip I am using is putting out a nibble of 4 bits representing a number in binary form. I need the arduino to read the state of these 4 pins and give me a number. I have done this via Picaxe in the past, but I can't seem to find the same thing in Arduino.
There has got to be an easy way of doing this without a lot of bit shifting and or simply assigning values to each input pin and adding them.