Test command

The test command changes the pin specified in the command to input mode and sets internal pull-up for the corresponding pin.

After this, the pin state is read and reported in the command response.

Syntax:

AT%XANTDETMAGPIO=<magpio_pin>

The test command parameters and their defined values are the following:

<magpio_pin>
0, 1, 2 - The MAGPIO pin whose state is read.

The response values are the following:

After the command, the pin state is set back to normal (high-Z).

The following command example sets MAGPIO pin 2 to input mode and sets internal pull-up for it. After this, the pin state is read and reported in the command response. After the command, the pin state is set back to normal (high impedance state):
AT%XANTDETMAGPIO=2
%XANTDETMAGPIO: 0
OK