Common Computer Science References
At the end of this lesson, you will be able to:
start to use buttons on a PyBadge
how to get a sprite to show up
see image below of CircuitPython uGame buttons
go over Python & operator
x & y -> Does a "bitwise and". Each bit of the output is 1 if the corresponding bit of x AND of y is 1, otherwise it's 0.
show demo of getting button input
get a sprite to move on your PyBadge
take 2 pictures of screen for your screenshot
Note: there are a max of 8 buttons and each one gives a 1 on an 8-bit number!
Ex:
00000000 - no buttons being pressed
00000001 - B button being pressed
00000010 - A button being pressed
10000001 - Left & B buttons being pressed
This is "Blinka" the CircuitPython mascot.