Class Relation1to1 - GSTCH/SketchMadeEASY GitHub Wiki

Relation1to1

Topic Specification
Description Sketch Made EASY combines inputs with actuators through logic. The logic is defined by the conditions. If a condition is true, the relation is to the actuator is active. This class is the logical link between input and actuator with a condition as to when it is active.
Constructor Relation1to1(Condition* Condition, Actuator* Actuator, Input* ActionParameter)
Parameter
Condition: Condition when the relation is active
Actuator: Actuator that does something if the condition is true
ActionParameter: Input value of the Actuator
Samples Relation1to1* relationLed1On = new Relation1to1(conditionLed1On, led1, FixValue::On());
Relation1to1* relationMotorForward = new Relation1to1(motorForwardCondition, motor, motorSpeed);
Examples This is the central class to define the logic of a sketch. Almost all examples of Sketch Made EASY have at least one of these.
⚠️ **GitHub.com Fallback** ⚠️