GROLAB USERBOT HW01 Manuel D'installation page 23

Table des Matières

Publicité

Les langues disponibles
  • FR

Les langues disponibles

  • FRANÇAIS, page 71
A er opening the SensorsTask.cpp, navigate
to the SensorsTask func on and search for the
comment that says '* IO Config *'. Below the
comment, you will find an example pin
configura on that you should adjust to match
your components. For the example diagram
the code should be the following:
Now, navigate to the GoSensorsTask func on
and look at the switch. Inside the case
ACT_ON_IOS, you should add the code to act
on the outputs. For example:
if (outputs[OUTPUT_INDEX0].value > 0)
digitalWrite(outputs[OUTPUT_INDEX0].arduinoPin, HIGH);
else
digitalWrite(outputs[OUTPUT_INDEX0].arduinoPin, LOW);
NOTE: The output array stores the state of the outputs. This
array is crucial to exchange info with the GroLab system.
EN
ES
FR
PT
IT
22

Publicité

Table des Matières
loading

Table des Matières