ILibrary
;ICotaskConstructor
using getCotaskConstructor
;run
;IInputPin
, IOutputPin
, etc.).}
getState
gets the current state of the pin (changes no more than once every 5ms).}
setState
sends a request to the device to change the state of the pin. Throws an exception if the request could not be sent.}
getValue
gets the current pin voltage in volts.}
getValue
returns the number of pulses for the last period.}
setDuty
sends the request, whether the duty cycle was changed, to the device. If the request failed, an exception will be thrown.getDuty
returns the current duty cycle of the PWM signal without requesting the device.getFrequency
returns the current frequency of the PWM signal.duty
will have. Here is the list of the recommended frequencies:getFrequency
and getDuty
.}
run
method.createInputPin
creates a pin in input mode.createOutputPin
creates a pin in output mode. It is necessary to pass the state that the pin will take immediately after initialization (initialState).createAnalogPin
creates a pin in analog input mode. Constants
createPulseCounterPin
creates a pin in pulse counter mode. Constants
createPwmPin
creates a pin in PWM output mode. run
sends the initialization table to the device and waits for confirmation. The Task then enters Run mode. After exiting the method, the current states of all pins in input and analog input modes will be obtained, as well as the initial states of all pins in output mode will be set.IInputPin
, IOutputPin
, etc.).run
method has already been called.Constants
).