utils/consoleIO.h provides the following function to a console application:

  • s_console_IO() : delivers the following commands
    • getPINx – reads the voltage level at PINx (x=1/3/7/9)

Syntax (example)

#include "utils/consoleIO.h"
. . .
. . .
s_console_string = s_console_IO( s_console_string );

Note: The AD converter needs to be initialised before it can be used. This can be done by calling DICE_ANALOG_INPUTS.begin(); within the setup() routine. (see DICE_Analog – Library)


String s_console_string – String that holds the user command. Normally returned by s_console_routine() or a previous console function.


String : the user command or an empty String “” if the user command was recognised and processed by this function. (see of commands above)

Example Code:

#include "consoleLogin.h"
#include "utils/consoleIO.h"

void setup() {
void loop() {
  String s_console_string = s_console_routine();  

Notes and Warnings

Hint: Use the consoleDev.h to switch the high side outputs of the dice_IO devices for the evaluation.

This console-function and its commands are helpful to test and learn to work with the analog inputs of the dice-IO. See the source code as example code for your own application:


In a ‘real world’ application, these commands might not be required but during development it could be helpful to test the analog inputs of the device.

Please keep in mind that each included file and its used function increase the size of the resulting application. So in order to keep the application binaries as small as possible, include only functions that are really necessary for the final application.

An example can be found in the Arduino IDE menu:
File -> Examples -> Consoles -> Dev_Console

See also

DICE_Analog – Library