Getting Started with Adafruit Circuit Playground Express by Mike Barela

Getting Started with Adafruit Circuit Playground Express by Mike Barela

Author:Mike Barela
Language: eng
Format: mobi, epub
ISBN: 9781680454857
Published: 2018-07-31T16:00:00+00:00


You can also use a hexadecimal value in the format 0xRRGGBB (decimal 30 = hex 0x1e):

cpx.pixels[9] = 0x1c00e000

All the pixels can be lit to the same color value specified using cpx.pixels.fill:

cpx.pixels.fill( (30, 0, 0) )

To turn off all pixels, set them to (0, 0, 0):

cpx.pixels.fill( (0, 0, 0) )

Set NeoPixel brightness Set the brightness of all pixels (from 0.0 to 1.0):

cpx.pixels.brightness = 0.3

Pads A1 through A7 being touched The touch pads are around the edge of the board.

if cpx.touch_A1:

print('Touched pad A1')

Change A1 to A2, A3, A4, A5, A6, A7 for other pads.

Set touch pad sensitivity Parameter: adjustment (integer)—The desired threshold increase; higher numbers make the touch pads less sensitive.

cpx.adjust_touch_threshold(200)

while True:

if cpx.touch_A1:

print('Touched pad A1 hard')



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.