Update of /cvsroot/pure-data/externals/hardware/arduino/Pd_firmware In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1552/Pd_firmware
Modified Files: Pd_firmware.pde Log Message: expanded [arduino] object and cleaned up the help patch; commented Arduino code and enabled digitalInput, tho it doesn't seem to work yet; it seems that there are bugs in [comport] since I can make it crash with the stress test with the new OVERLAPPED mode, and the older synchronous mode
Index: Pd_firmware.pde =================================================================== RCS file: /cvsroot/pure-data/externals/hardware/arduino/Pd_firmware/Pd_firmware.pde,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Pd_firmware.pde 21 May 2006 17:37:46 -0000 1.7 --- Pd_firmware.pde 22 May 2006 17:13:53 -0000 1.8 *************** *** 1,13 **** ! /* Pd_firmware * ------------------ * ! * ! * It was designed to work with the Pd patch of the same ! * name in: Help -> Browser -> examples -> hardware ! * ! * (cleft) 2006 Hans-Christoph Steiner * @author: Hans-Christoph Steiner ! * @date: 2006-03-10 ! * @location: Polytechnic University, Brooklyn, New York, USA */
--- 1,14 ---- ! /* Pd_firmware aka Pduino * ------------------ + * + * It was designed to work with the Pd object [arduino] + * which is included in Pd-extended. This firmware could + * easily be used with other programs like Max/MSP, Processing, + * or whatever can do serial communications. * ! * (copyleft) 2006 Hans-Christoph Steiner hans@at.or.at * @author: Hans-Christoph Steiner ! * @date: 2006-05-19 ! * @location: STEIM, Amsterdam, Netherlands */
*************** *** 58,66 **** * 13 analogIn5 byte1 * 14 cycle marker (255/11111111) - * - * - * TX RX - * ----------------------- - * */
--- 59,62 ---- *************** *** 119,124 **** else { // TODO: get digital in working ! // digitalData = digitalRead(digitalPin); ! digitalData = pwmStatus; } transmitByte = transmitByte + (2^(i+1-startPin)*digitalData); --- 115,119 ---- else { // TODO: get digital in working ! digitalData = digitalRead(digitalPin); } transmitByte = transmitByte + (2^(i+1-startPin)*digitalData); *************** *** 150,153 **** --- 145,151 ----
// ------------------------------------------------------------------------- + /* this function checks to see if there is data waiting on the serial port + * then processes all of the stored data + */ void checkForInput() { if(serialAvailable()) { *************** *** 244,263 **** setPinMode(waitForPWMData, PWM); break; ! case 238: digitalInputsEnabled = false; break; ! case 239: digitalInputsEnabled = true; break; ! case 240: ! case 241: ! case 242: ! case 243: ! case 244: ! case 245: ! case 246: analogInputsEnabled = inputData - 240; break; ! case 255: firstInputByte = true; break; --- 242,261 ---- setPinMode(waitForPWMData, PWM); break; ! case 238: // all digital inputs off digitalInputsEnabled = false; break; ! case 239: // all digital inputs on digitalInputsEnabled = true; break; ! case 240: // analog input off ! case 241: // analog 0 on ! case 242: // analog 0,1 on ! case 243: // analog 0-2 on ! case 244: // analog 0-3 on ! case 245: // analog 0-4 on ! case 246: // analog 0-5 on analogInputsEnabled = inputData - 240; break; ! case 255: // incoming digital output bytes firstInputByte = true; break; *************** *** 293,296 **** --- 291,295 ---- printByte(0); printByte(0); + checkForInput(); }