User Manual
Print

Set the Position of Four Digit Display

Create Four Digit Display with port

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>MotorDriver</variable></variables><block type=\"Grove_createFourDigitDisplay\" disabled=\"true\" x=\"157\" y=\"472\"><field name=\"port\">GroveDigitalPort.D5</field></block></xml>"}
				
			

This is used for setting the four digit display in the correct position.

Parameters: N/A

Condition: D5 (Default)/D16/D18/D22/D26

Output: N/A
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_setColon\"><field name=\"status\">Switch.ON</field><value name=\"FourDigitDisplay\"><block type=\"variables_get\"><field name=\"VAR\">FourDigitDisplay</field></block></value></block></next></block></statement></block></xml>"}
				
			

The output:

Create Four Digit Display with Port - Output 1
Create Four Digit Display with Port - Output 2