Update of /cvsroot/pure-data/externals/hardware/arduino/Pd_firmware In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25860/Pd_firmware
Modified Files: Pd_firmware.pde Log Message: looks like analog input is working fine, next, the digital inputs need to be tested.
Index: Pd_firmware.pde =================================================================== RCS file: /cvsroot/pure-data/externals/hardware/arduino/Pd_firmware/Pd_firmware.pde,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Pd_firmware.pde 20 May 2006 15:50:48 -0000 1.5 --- Pd_firmware.pde 20 May 2006 16:26:57 -0000 1.6 *************** *** 252,285 **** // ------------------------------------------------------------------------- void loop() { - // read all digital pins - //transmitDigitalInput(0); - //transmitDigitalInput(7); /* * get analog in */ ! /* ! for(analogPin=0; analogPin<5; ++analogPin) ! { ! analogData = analogRead(analogPin); ! // these two bytes get converted back into the whole number in Pd ! printByte(analogData >> 7); // bitshift the big stuff into the output byte ! printByte(analogData % 128); // mod by 32 for the small byte ! } ! */ ! // ++analogPin; ! // if (analogPin > 5) analogPin = 0; ! /* end with the cycle marker */ ! // bitshift the big stuff into the output byte ! printByte(digitalPinStatus >> 7); ! // clear the 8th bit before truncating to a byte for small data byte ! printByte(digitalPinStatus % 128);
! printByte(pwmStatus >> 7); ! printByte(pwmStatus % 128);
checkForInput();
printByte(255); ! setPinMode(13,OUTPUT); ! digitalWrite(13,HIGH); } --- 252,276 ---- // ------------------------------------------------------------------------- void loop() { /* * get analog in */ ! for(analogPin=0; analogPin<6; ++analogPin) ! { ! analogData = analogRead(analogPin); ! // these two bytes get converted back into the whole number in Pd ! printByte(analogData >> 7); // bitshift the big stuff into the output byte ! printByte(analogData % 128); // mod by 32 for the small byte ! }
! // read all digital pins ! transmitDigitalInput(0); ! transmitDigitalInput(7);
checkForInput();
+ /* end with the cycle marker */ printByte(255); ! ! // setPinMode(13,OUTPUT); ! // digitalWrite(13,HIGH); }