User Manual

Digital Read
Then, you can read the values True or False with ss.digital_read(
signal
)
Don't forget you have to set it to be an INPUT first! And if you don't have an external pull up resistor, you'll need to set it
in the code.
Digital Write
Or, you can set the signal you want to a high value with ss.digital_write(
signal
, True) , or set to low value with
ss.digital_write(
signal
, False) . Don't forget you have to set it to be an OUTPUT first!
Analog Reads
You can also read analog values like from a
potentiometer or sensor.
Let's do a demonstration where the center tap of a
potentiometer is hooked up to Signal #3 - don't forget to
also connect one side of the potentiometer to 3.3V and
the other side to ground.
And here is the example code. You can see we read the signal with ss.analog_read(
signal
) which returns a value from
0 to 1023.
ss.digital_read(BUTTON_1)
# LED On
ss.digital_write(LED_2, True)
# LED Off
ss.digital_write(LED_2, False)
© Adafruit Industries
https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-
construction-kit
Page 109 of 201