stop erratic numbers?

hello all,

got an arduino [new one after i fried the first :)] used with the arduino2max code. i then made my own max patch to control daw programs converting serial to midi. all is working very well, which is great.
although in the end i will do some different code for when i finish the controller.

i have 3 pots connected to the first analog inputs and 2 buttons [only push] connected to the first digital ports.

there is a problem i am having with the push buttons. i have indicators showing on what gets used, so when anything is pressed or turned, a led comes on the program [just until i fit leds to the controller itself]. but the indicators for buttons is flickering randomly on and off and is sending a signal even when not pressed.

i saw on the arduino2max and also the maxuino code and programs, that the leds with flicker because information is still being sent etc.

how can this be averted?

many thanks...

lewis edwards

smokingbunny.co.uk

do the digital inputs have pull-up resistors or internal pull-ups enabled - if not they will be floating which could explain it.

no, no they dont. that would explain then.
right, next thing on my shopping list :).

thanks...

actually, since they can be done internally, i will look at the code again.

thanks...