User Manual
Print

Reading the Current Voltage

Analog read port input voltage

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Grove_analogReadVoltage\" disabled=\"true\" x=\"-22\" y=\"337\"><field name=\"port\">GroveAnalogPort.A0</field></block></xml>"}
				
			

This is used for reading the current voltage of the hardware.

Parameters: N/A

Condition: A0 (Default)/A2/A4/A6

Output: Number
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=\"basic_consoleLogNum\"><value name=\"num\"><block type=\"Grove_analogReadVoltage\"><field name=\"port\">GroveAnalogPort.A0</field></block></value></block></statement></block></xml>"}
				
			

The output:

Analog Read Port Input Voltage - Output