added sound of color
This commit is contained in:
		@@ -14,6 +14,13 @@ These six activities require the LEGO® MINDSTORMS® Education EV3 Core Set (455
 | 
			
		||||
  "url":"/maker/sound-machine",
 | 
			
		||||
  "cardType": "example",
 | 
			
		||||
  "imageUrl": "/static/maker/sound-machine.png"
 | 
			
		||||
},
 | 
			
		||||
{
 | 
			
		||||
  "name": "Sound Of Color",
 | 
			
		||||
  "description": "Play different sounds based on the color",
 | 
			
		||||
  "url":"/maker/sound-of-color",
 | 
			
		||||
  "cardType": "example",
 | 
			
		||||
  "imageUrl": "/static/maker/sound-of-color.png"
 | 
			
		||||
}
 | 
			
		||||
]
 | 
			
		||||
```
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								docs/maker/sound-of-color.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								docs/maker/sound-of-color.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
# Sound Of Color
 | 
			
		||||
 | 
			
		||||
This program will play different sounds when the wheel is rotated. The sound is determined by which color is placed in front of the color Sensor.
 | 
			
		||||
 | 
			
		||||
```blocks
 | 
			
		||||
input.color3.onColorDetected(ColorSensorColor.Blue, function () {
 | 
			
		||||
    music.playTone(Note.G4, music.beat(BeatFraction.Half))
 | 
			
		||||
})
 | 
			
		||||
input.color3.onColorDetected(ColorSensorColor.Red, function () {
 | 
			
		||||
    music.playTone(Note.C5, music.beat(BeatFraction.Half))
 | 
			
		||||
})
 | 
			
		||||
input.color3.onColorDetected(ColorSensorColor.Green, function () {
 | 
			
		||||
    music.playTone(Note.D5, music.beat(BeatFraction.Half))
 | 
			
		||||
})
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								docs/static/maker/sound-machine.png
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/static/maker/sound-machine.png
									
									
									
									
										vendored
									
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 141 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/static/maker/sound-of-color.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/static/maker/sound-of-color.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 159 KiB  | 
		Reference in New Issue
	
	Block a user