Добавлена команда для зуммера
This commit is contained in:
		
							
								
								
									
										7
									
								
								UsbTitle/UsbTitle.ino
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										7
									
								
								UsbTitle/UsbTitle.ino
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @ -23,6 +23,7 @@ void setup() { | |||||||
|   lc.setIntensity(0,0); |   lc.setIntensity(0,0); | ||||||
|   /* and clear the display */ |   /* and clear the display */ | ||||||
|   lc.clearDisplay(0); |   lc.clearDisplay(0); | ||||||
|  |   pinMode(3, OUTPUT); | ||||||
|   delay(1000);  |   delay(1000);  | ||||||
| } | } | ||||||
|  |  | ||||||
| @ -65,6 +66,12 @@ void loop() { | |||||||
|             }else{ |             }else{ | ||||||
|               lc.shutdown(0,true); |               lc.shutdown(0,true); | ||||||
|             } |             } | ||||||
|  |           }else if (lastCmd == 0x7a){ // команда z0..f | ||||||
|  |             if (lastRead == 0x30){ | ||||||
|  |               noTone(3); | ||||||
|  |             }else{ | ||||||
|  |               tone(3, 100*(lastRead-0x30)); | ||||||
|  |             } | ||||||
|           } |           } | ||||||
|           lastCmd = 0xFF; |           lastCmd = 0xFF; | ||||||
|         } |         } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user