Blame view

tests/atmega2560/stepperControl.c 315 Bytes
c52f6592   pfrison   Rédaction de quel...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  #include <avr/io.h>
  #include <util/delay.h>
  
  int vitesseToDelay(int vitesse){
  	return ;
  }
  
  int main(void){
  	DDRC = 0x01;
  	PORTC |= 0x02; // Direction horraire ?
  	//PORTC &= 0xFD; // Direction anti-horraire ?
  	while(1){
  		// 1 Step
  		PORTC |= 0x01;
  		_delay_ms(10);
  		PORTC &= 0xFE;
  		_delay_ms(10);
  	}
  	return 0;
  }