
Variable Numeric Slot_AnalogBut = 1

Label ReadButtonsWithADC
	Variable Numeric CB1
	For v1 = 1 To Infinity
		'------------------------------------- Double check
		CB1 = Slot(Slot_AnalogBut)
		Wait Seconds 0.01
		If Abs(Slot(Slot_AnalogBut) - CB1) > 10
			CB1 = 99999
		EndIf
		'------------------------------------- Test values
		Select True
			Case CB1 < 16
				Yellow
			Case CB1 < 55
				Blue
			Case CB1 < 120
				Green
			Case CB1 < 190
				Red
			Case CB1 < 500
				White
		EndSelect
	Next
Return

Label Yellow
	Print "Yellow"
	Beep 440 50
Return
Label Blue
	Print "Blue"
	Beep 660 50
Return
Label Green
	Print "Green"
	Beep 880 50
Return
Label Red
	Print "Red"
	Beep 1320 50
Return
Label White
	Print "White"
	Beep 1660 50
Return


