User Manual
Print

Set the Brightness of Four Digit Display

Four Digit Display : Set Colon

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>FourDigitDisplay</variable></variables><block type=\"Grove_FourDigitDisplay_setBrightness\" disabled=\"true\" x=\"23\" y=\"247\"><value name=\"FourDigitDisplay\"><block type=\"variables_get\" disabled=\"true\"><field name=\"VAR\">FourDigitDisplay</field></block></value><value name=\"brightness\"><shadow type=\"math_number_minmax\" disabled=\"true\"><mutation min=\"0\" max=\"7\" label=\"Brightness\" precision=\"0\"/><field name=\"SLIDER\">2</field></shadow></value></block></xml>"}
				
			

This is used for setting the brightness of the light for the four-digit display.

Parameters: Four Digit Display

Condition: Number (Default: 2)

Output: Four Digit Display
Sample code:

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>FourDigitDisplay</variable></variables><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"variables_set\"><field name=\"VAR\">FourDigitDisplay</field><value name=\"VALUE\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow><block type=\"Grove_createFourDigitDisplay\"><field name=\"port\">GroveDigitalPort.D5</field></block></value><next><block type=\"Grove_FourDigitDisplay_setBrightness\"><value name=\"FourDigitDisplay\"><block type=\"variables_get\"><field name=\"VAR\">FourDigitDisplay</field></block></value><value name=\"brightness\"><shadow type=\"math_number_minmax\"><mutation min=\"0\" max=\"7\" label=\"Number\" precision=\"0\"/><field name=\"SLIDER\">7</field></shadow></value><next><block type=\"Grove_FourDigitDisplay_showNumber\"><value name=\"FourDigitDisplay\"><block type=\"variables_get\"><field name=\"VAR\">FourDigitDisplay</field></block></value><value name=\"num\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow></value></block></next></block></next></block></statement></block></xml>"}
				
			

The output:

Four Digit Display Set Brightness - Output 1
Four Digit Display Set Brightness - Output 2