Hello,
I have a question about controlling a DC motor with the SampleLight program. I have connected my CC2530 board to a hub and also a DC motor. Unfortunately when I incoorperate the DC motor program into my it only moves in a certain direction for a couple ms. I had tested my motor program separate from the SampleLight program and it spun for at least 3 seconds in either direction, but it spins for a fraction of a second when integrated with the SampleLight program. Below is some of the code for my motor. "How would I make the DC motor spin longer in the SampleLight program?"
#define forward P1_5
#define backward P1_3
void delay(uint ms){
uint i,j;
for(i=ms;i>0;i--)
for(j=110;j>0;j--);
}
void main(void){
forward = 0;
backward = 1;
delay(10000);
forward = 0;
backward = 0;
delay(10000);
forward = 1;
backward = 0;
delay(10000);
forward = 0;
backward = 0;
delay(10000);
}