[PD-cvs] externals/hardware/arduino/Pd_firmware Pd_firmware.pde, 1.13, 1.14

Hans-Christoph Steiner eighthave at users.sourceforge.net
Sun Aug 27 05:36:49 CEST 2006


Update of /cvsroot/pure-data/externals/hardware/arduino/Pd_firmware
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15683/Pd_firmware

Modified Files:
	Pd_firmware.pde 
Log Message:
attempts at getting pwm working again; some cleanups

Index: Pd_firmware.pde
===================================================================
RCS file: /cvsroot/pure-data/externals/hardware/arduino/Pd_firmware/Pd_firmware.pde,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Pd_firmware.pde	25 Aug 2006 06:18:18 -0000	1.13
--- Pd_firmware.pde	27 Aug 2006 03:36:47 -0000	1.14
***************
*** 280,287 ****
    
    // a few commands have byte(s) of data following the command
!   if( waitForData > 0 ) {  
!     storedInputData[waitForData - 1] = inputData;
!     //analogWrite(waitForPWMData,inputData);
      waitForData--;
    }
    else if(executeMultiByteCommand) {
--- 280,286 ----
    
    // a few commands have byte(s) of data following the command
!   if( waitForData > 0) {  
      waitForData--;
+     storedInputData[waitForData] = inputData;
    }
    else if(executeMultiByteCommand) {
***************
*** 289,299 ****
      switch(executeMultiByteCommand) {
      case ENABLE_PWM:
      case DISABLE_PWM:
!       //PWM 0 on the board is PIN 9
!       analogWrite(storedInputData[0] + 9, storedInputData[1]);
        break;
      case ENABLE_SOFTWARE_PWM:
!       setPinMode(storedInputData[0],SOFTPWM);
!       setSoftPwm(storedInputData[0], storedInputData[1]);     
        break; 
      case DISABLE_SOFTWARE_PWM:
--- 288,300 ----
      switch(executeMultiByteCommand) {
      case ENABLE_PWM:
+       setPinMode(storedInputData[1],PWM);
+       analogWrite(storedInputData[1], storedInputData[0]);
+       break;
      case DISABLE_PWM:
!       setPinMode(storedInputData[0],INPUT);
        break;
      case ENABLE_SOFTWARE_PWM:
!       setPinMode(storedInputData[1],SOFTPWM);
!       setSoftPwm(storedInputData[1], storedInputData[0]);     
        break; 
      case DISABLE_SOFTWARE_PWM:





More information about the Pd-cvs mailing list