i run into a deadend and my suspicion is, there might be a firmware bug on the wiring board.

it seems each time a serial event is triggred, the digital ports (set as INPUT) are triggerd as well.

in my application a button is connected to one of the digital io ports (set as input) and the script checks the input status (digitalRead(button_pin)) in the main loop. the script has also a serialevent() function. each time it receives a char through the serial port the button digitalRead is HIGH, without the button being pressed.

I am counting how many cycles a particular pin stays high. For some strange reason, the following bit of code only works on the first pin of PORT 0 (pin 0, none of the others) and the first pin of PORT1 (pin 8, none of the others).

I've done the "pinMode(whateverPin,INPUT);" thing in setup for each pin I've tried. Then I just call the function readPulseWidth(whateverPin) and send the results to the serial monitor. After many wiring permutations, I'm positive that it only depends on which pin I'm using. Even in an utterly simple example hardcoding the pin number, it behaves the same. Only the first pin in each port (0,8,16) works.

I am counting how many cycles a particular pin stays high. For some strange reason, the following bit of code only works on the first pin of PORT 0 (pin 0, none of the others) and the first pin of PORT1 (pin 8, none of the others).

I've done the "pinMode(whateverPin,INPUT);" thing in setup for each pin I've tried. Then I just call the function readPulseWidth(whateverPin) and send the results to the serial monitor. After many wiring permutations, I'm positive that it only depends on which pin I'm using. Even in an utterly simple example hardcoding the pin number, it behaves the same. Only the first pin in each port (0,8,16) works.

hey people I have already the code for communicating processing and wiring, but my question is a bit electronical. I could say I have a really good knowledge in prograaming and solving code problems, but...

If I wat to use several buttons connected in a wiring... do i have to use a protoboard in order to connect all of them to Wiring? please help, i don´t have a very large knowledge in electronics, thanks

A protoboard makes easy to do a prototype check this: http://wiring.org.co/learning/topics/switchesprocessing.html , then you could move to a generic pcb to fix things like this soldering protoboard: http://www.nastypixel.com/instantsoup/recipes/tinkertoy/build/I hope this help, let me know.