muchas gracias esteban
hasta ahorita asi va el codigo
#define DEBUG 1
#define PULLUP 1
#define SWITCH_PRESSED (!PULLUP)
#define NUMBER_OF_PINS 10
byte switchPin[NUMBER_OF_PINS]={3,4,5,6,7,8,9,10,11,12};
boolean switchValues[NUMBER_OF_PINS] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
void setup (){
for (byte i=0; i<NUMBER_OF_PINS; i++){
pinMode (switchPin[i],INPUT);
if (PULLUP){
digitalWrite(switchPin[i],HIGH);
}
}
if (DEBUG) {Serial.begin (9600);}
}
void loop(){
for (byte i=0; i<NUMBER_OF_PINS; i++){
if (digitalRead(switchPin[i])==SWITCH_PRESSED){
switchValues[i]=true;
}
else{
switchValues[i]=false;
}
}
}
estoy posteando tambien en la seccion en ingles
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238620664y pues de ahi salio este codigo
lo q no se... si ya con eso puedo enviar los datos a un programa externo como processing o flash (utilizando serproxy)
o me faltara alguna sentencia dentro del ultimo ciclo