mirror of
				https://github.com/brmlab/ratbox.git
				synced 2025-10-30 21:43:58 +01:00 
			
		
		
		
	PotkanSkinner.pde: Robustnejsi komunikace s pocitacem
This commit is contained in:
		
							parent
							
								
									dce5a33018
								
							
						
					
					
						commit
						8980b72371
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -76,7 +76,9 @@ void loop_rw() | |||
|       case 'D': digitalWrite(door_pin, HIGH); break; | ||||
|       case 'S': sid = 1; // fall through | ||||
|       case 's': /* sid = 0; */ { | ||||
| 	while (!Serial.available()) /* spin */; | ||||
|         unsigned char pos = Serial.read(); | ||||
| 	if (pos >= '0' && pos <= '3') | ||||
| 		servo[sid].write(servo_pos[sid][pos - '0']); | ||||
|       } | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Petr Baudis
						Petr Baudis