コード例 #1
0
ファイル: PanicButtonHandler.cpp プロジェクト: ximilian/pal
void All_Stop()
	/*--------------------
		mise a 0 des vitesses moteurs et debrayage
		Sert pour la sortie de manip
		---------------------*/
{
	CPhidgetMotorControl_setVelocity (motorControl, 0,0);
	CPhidgetMotorControl_setVelocity (motorControl, 1,0);
	Gere_Embrayage(DEBRAYE);
	Buzzer(0);
}
コード例 #2
0
ファイル: WebClient.c プロジェクト: refen/zlg28xdemo
//const char nmotor[] = {"Motor"};
int streamProcess(char *recebuffer)
{
	char *p;
	if(NULL == (p=findValueByName(recebuffer,nbuzzer)))
		return -1;
	printf("Buzzer:%s\n",p);
	Buzzer(p);
	if(NULL == (p=findValueByName(recebuffer,nled)))
		return -1;
	printf("Led:%s\n",p);
	Led(p);
	return 1;
}
コード例 #3
0
ファイル: demo.c プロジェクト: westlicht/camcontrol
int main(void) {     

	//Ports 
	InitPorts();


	//Init Uart1 
	InitUart1();
	               	 
	//LCD initialisation 
	LCD_Ini(); 					     
	// delay_ms(2);  		
	SEND_CMD(DISP_ON);
	// delay_ms(10);  						
	SEND_CMD(CLR_DISP); 
	// write
	SEND_STR(" www.olimex.com");


	while (1) {  

		// Uart Echo
		ch = ReceiveCharUart1_nonstop();
		if(ch!=0) {
	
			SendCharUart1(ch);
			SendCharUart1('*');
			ch = 0;
		}


		//Buttons scan                
   
		// Button 1
		if (B1==0) {
			RELAY_HIGH;        
		}
	    else { 
			RELAY_LOW;	      
		}
    
		// Button 2
		if (B2==0) {
	
			SEND_CMD(CLR_DISP);      	
			SEND_CMD(DD_RAM_ADDR);
			SEND_STR("Press button 2"); 
		}  
    

		// Button 3    
		if (B3==0) {
	       
			SEND_CMD(CLR_DISP);   
			SEND_CMD(DD_RAM_ADDR);  
			SEND_STR("Press button 3"); 
		  
		}       
		
		// Button 4
		while (B4==0) 
			Buzzer();


		// Button 3    
		if (B5==0) {
	       
			SEND_CMD(CLR_DISP);   
			SEND_CMD(DD_RAM_ADDR);  
			SEND_STR("Press button 5"); 
		  
		} 
   
  	}
}