I've been having troubles reading the digital inputs of an arduino duemilanove (328) using the pduino firmware. I mean having troubles like not reading anything from them at all.
Analog ins and digital outs work fine, but the DI do not want to read anything. I've checked that they are OK (I can effectively read them) with other sketches including the button read example from the arduino website, so there are no hardware issues.
I've tried he latest version of the pduino firmware, and went all the way back to pduino 0.4 with firmata 2.0. I even changed the moocow objects for flatspace as someone hinted somewhere here but to no avail (yes, I'm on windows XP).
I've tried the pduino-help and pduino-test patches included with the download and everything works except the digital input reading.
.. and of course, the digital ports are enabled and the pins' output mode are in 0 (input) and the serial port is set correctly both with the selector and inside the [arduino] object (just in case)
The toggle objects do not change at all in the lower right section of the pduino-test patch. As a matter of fact nothing comes out of any [route digital] object, even if it is directly connected to the [arduino] object
Am I missing something here?
any help would be appreciated
What about the pull up resistors? Do you have some or have you enabled the internal ones? Are the internal pull ups enabled with pduino.
Thanks for the reply
yup.. I did..
I started with the pduino-test and tested the analog inputs, since I thought that it would be tougher to get them going and as it worked I connected a simple shield to interface with my sensors. For the digital inputs I'm simply measuring when a set of switches that are normally high go to zero. The output of the switches are connected to 5v through a resistor serving as pull-ups (or at lest that's what I thought)
since that didn't worked I went back to the arduino-test patch and started testing everything. I enabled the digital inputs sending a [digitalIns 1( message to the [arduino] object and tried the digital inputs switching between ground and 5V and nothing happened. I thought that sending a digitalIns 1 message would activate the internal pull-ups.
I used the same switch configuration to test the digital inputs with the button example from the arduino website and it worked. with that example I tried every digital input to check for hardware failures and they all worked.
So it all seems to be that either I'm missing something with the pduino configuration.
Do I need an extra pull-up resistor even when I activate the internal ones if I use the pduino? it doesn't make sense if I do.