Update of /cvsroot/pure-data/externals/hardware/arduino/Pd_firmware In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2438/Pd_firmware
Modified Files: Pd_firmware.pde Log Message: added the [devices( message to the test patch; applied David Mellis' patch to get things working with Arduino-0008
Index: Pd_firmware.pde =================================================================== RCS file: /cvsroot/pure-data/externals/hardware/arduino/Pd_firmware/Pd_firmware.pde,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Pd_firmware.pde 13 Apr 2007 05:28:23 -0000 1.31 --- Pd_firmware.pde 27 Jun 2007 20:59:24 -0000 1.32 *************** *** 97,101 **** mask = 1 << i; if( (digitalPinStatus & mask) && !(pwmStatus & mask) ) { ! digitalWrite(i, twoBytesForPorts & mask); } } --- 97,101 ---- mask = 1 << i; if( (digitalPinStatus & mask) && !(pwmStatus & mask) ) { ! digitalWrite(i, twoBytesForPorts & mask ? HIGH : LOW); } } *************** *** 108,117 **** if(reportDigitalInputs) { previousDigitalInputs = digitalInputs; ! digitalInputs = _SFR_IO8(port_to_input[PB]) << 8; // get pins 8-13 ! digitalInputs += _SFR_IO8(port_to_input[PD]); // get pins 0-7 digitalInputs = digitalInputs &~ digitalPinStatus; // ignore pins set OUTPUT if(digitalInputs != previousDigitalInputs) { // TODO: implement more ports as channels for more than 16 digital pins ! Firmata.sendDigital(0, digitalInputs); // port 0 till more are implemented /* Serial.print(DIGITAL_MESSAGE,BYTE); Serial.print(digitalInputs % 128, BYTE); // Tx pins 0-6 --- 108,117 ---- if(reportDigitalInputs) { previousDigitalInputs = digitalInputs; ! digitalInputs = PINB << 8; // get pins 8-13 ! digitalInputs += PIND; // get pins 0-7 digitalInputs = digitalInputs &~ digitalPinStatus; // ignore pins set OUTPUT if(digitalInputs != previousDigitalInputs) { // TODO: implement more ports as channels for more than 16 digital pins ! Firmata.sendDigitalPortPair(0, digitalInputs); // port 0 till more are implemented /* Serial.print(DIGITAL_MESSAGE,BYTE); Serial.print(digitalInputs % 128, BYTE); // Tx pins 0-6 *************** *** 276,281 **** byte i;
- Serial.begin(57600); // 9600, 14400, 38400, 57600, 115200 - // flash the pin 13 with the protocol version pinMode(13,OUTPUT); --- 276,279 ---- *************** *** 295,300 **** // TODO: load state from EEPROM here
- Firmata.printVersion(); - /* TODO: send digital inputs here, if enabled, to set the initial state on the * host computer, since once in the loop(), the Arduino will only send data on --- 293,296 ----