You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
motor: "A", "B", "AB". "A" controls motor A only "B" controls motor B only and "AB" controls motors A and B simultaneously.
state: 0 or 1 or -1 if digital mode is used and -100 to 100 if analog mode is used. Positive values are used for forward, negative values are used for reverse.
mode: "digital" or "analog"
Cing.ReadButtonExternal()
Description
Reads the value from external button, either 0 or 1.
Syntax
Cing.ReadButtonExternal()
Returns
0 if button is not pressed or 1 if button is pressed.
Cing.ReadPotentiometerExternal()
Description
Reads the value from external potentiometer.
Syntax
Cing.ReadPotentiometerExternal()
Returns
From 0 to 100 depending on potentiometer position.
Cing.ReadLightSensor()
Description
Reads the value from light sensor.
Syntax
Cing.ReadLightSensor(sensor,mode)
Parameters
sensor: 1 or 2 used for selection of sensor
mode: "digital" or "analog"
Returns
From 0 to 100 in analog mode and either 0 or 1 in digital mode.
Cing.ReadShineSensor()
Description
Reads the value from external shine sensor.
Syntax
Cing.ReadShineSensor()
Returns
From 0 to 100 depending on ambient light.
Cing.ReadUltrasonicSensor()
Description
Reads the value from external ultrasonic sensor.
Syntax
Cing.ReadUltrasonicSensor()
Returns
Distance in mm from 0 or 1. 1 means obstacle at distance lower then trigger distance(can be set by potentiometer) and 0 means no obstacle.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.