예제 #1
0
int main(void) {
	system_init();
	uart_on(0, 115200, NULL);
	adc_on();

	while (1) {
		chenillard(500);
		/* ADC Test */
		adc_display(LPC_ADC_NUM(0), 0);
		TMP36_display(LPC_ADC_NUM(1), 0);
	}
	return 0;
}
예제 #2
0
파일: main.c 프로젝트: B-C/ELEC223
int main() 
{
	play_score_init();
	
	play_score(poireau);

	serial_init();
	switchAllOnState(ON);
	musical_keyboard();

	chenillard();

	return 0; //EXIT_SUCCESS
}
예제 #3
0
파일: main.c 프로젝트: abetas/ProjetElec
void main()
{


   setup_adc_ports(NO_ANALOGS);
   setup_adc(ADC_OFF);
   setup_psp(PSP_DISABLED);
   setup_spi(SPI_SS_DISABLED);
   setup_wdt(WDT_OFF);
   setup_timer_0(RTCC_INTERNAL);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);
   enable_interrupts(INT_RDA);
   enable_interrupts(GLOBAL);
   setup_low_volt_detect(FALSE);


    //Setup_Oscillator parameter not selected from Intr Oscillotar Config tab
    //intitSerie(31);

   set_tris_a(0b00101111);
   set_tris_c(0b11111101);
   Set_tris_D(0b11100000); // port D : Led
   
   lectureTrame();
   
   while(true){
   
         if(truc=='c'){
         clignotement();
         }
         if(truc=='j'){
         johnson();
         }
         if(truc=='t'){
         compteur();
         }
         if(truc=='h'){
         chenillard();
         }
      
   }
}
예제 #4
0
int main(void) {
	system_init();
	uart_on(0, 115200, NULL);
	adc_on();

	uprintf(0, "System started\n");
	msleep(5);
	watchdog_config(&wdconf);
	uprintf(0, "Watchdog started\n");

	while (1) {
		watchdog_feed();
		chenillard(50);
		/* ADC Test */
		adc_display(LPC_ADC_NUM(0), 0);
	}
	return 0;
}