User Manual
Print

Doing Actions when Meeting the Boolean Conditions

While false do

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"device_while\" disabled=\"true\" x=\"23\" y=\"202\"><value name=\"COND\"><shadow type=\"logic_boolean\" disabled=\"true\"><field name=\"BOOL\">FALSE</field></shadow></value></block></xml>"}
				
			

This is used to do some actions in several times.

Parameters: Display setting: Boolean (True/False [Default])

Output: N/A
Sample code:

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"device_while\"><value name=\"COND\"><shadow type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></shadow></value><statement name=\"DO\"><block type=\"basic_consoleLogNum\"><value name=\"num\"><shadow type=\"math_number\"><field name=\"NUM\">1</field></shadow></value><next><block type=\"basic_sleep\"><value name=\"ms\"><shadow type=\"math_number\"><field name=\"NUM\">1000</field></shadow></value></block></next></block></statement></block></statement></block></xml>"}
				
			

The output:

While True - Output