Repository navigation
Sensors

Reads the P1's S pin and sends the value back. This is an analog pin and the value that is read will be between 0 and 65535. This range can be converted to volts. Visit Adafruit's Circuitpython Essentials guide to learn more.
None
pvalue = cutebot.p1 # sets the variable pvalue equal to value of P1's S pin at that moment
print(cutebot.p1) # prints the value of P1's _S_ pin at that momentReads the P2's S pin and sends the value back. This is an analog pin and the value that is read will be between 0 and 65535. This range can be converted to volts. Visit Adafruit's Circuitpython Essentials guide to learn more.
None
pvalue = cutebot.p2 # sets the variable pvalue equal to value of P2's S pin at that moment
print(cutebot.p2) # prints the value of P2's S pin at that moment
Emits a pulse and times how long it takes to hear it bounce back. The value that is returned is in centimeters (cm).
None
pvalue = cutebot.sonar # sets the variable pvalue equal to distance at that moment
print(cutebot.sonar) # prints the distance at that moment![]()
Reads the line tracking senors and returns two values. One for each sensor: left and right. The values returned are either True when the sensor over very dark color or False when over a very light color.
None
leftd, rightd = cutebot.tracking # sets the variable leftd and rightd equal to sensors states at that moment
print(cutebot.tracking) # prints the sensors states at that moment