Subversion Repositories svnkaklik

Rev

Rev 365 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 365 Rev 366
Line 1... Line 1...
1
#include "motor.h"
1
#include "motor.h"
2
#use i2c(Slave,Fast,sda=PIN_B1,scl=PIN_B4,force_hw,address=0xA0) // Motor 1
2
//#use i2c(Slave,Fast,sda=PIN_B1,scl=PIN_B4,force_hw,address=0xA0) // Motor 1
3
//#use i2c(Slave,Fast,sda=PIN_B1,scl=PIN_B4,force_hw,address=0xA2) // Motor 2
3
#use i2c(Slave,Fast,sda=PIN_B1,scl=PIN_B4,force_hw,address=0xA2) // Motor 2
4
 
4
 
5
#define H1 PIN_A1
5
#define H1 PIN_A1
6
#define L1 PIN_A2
6
#define L1 PIN_A2
7
#define H2 PIN_A3
7
#define H2 PIN_A3
8
#define L2 PIN_A4
8
#define L2 PIN_A4
Line 72... Line 72...
72
         output_low(H1);      // vzad
72
         output_low(H1);      // vzad
73
         output_high(H2);
73
         output_high(H2);
74
         output_high(L1);
74
         output_high(L1);
75
         output_low(L2);
75
         output_low(L2);
76
      };
76
      };
77
      delay_us(127-abs(command));
77
      delay_us(abs(command));
78
      output_low(H1);
78
      output_low(H1);
79
      output_low(H2);
79
      output_low(H2);
80
      output_low(L1);
80
      output_low(L1);
81
      output_low(L2);
81
      output_low(L2);
82
   }
82
   }