Created
November 2, 2022 13:37
-
-
Save topshed/684bbacecc9ad71c37caa30e3db3dec4 to your computer and use it in GitHub Desktop.
pumpkin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the libraries | |
from sense_hat import SenseHat | |
from time import sleep | |
# Set up the Sense HAT | |
sense = SenseHat() | |
sense.set_rotation(270, False) | |
# Set up the colour sensor | |
sense.color.gain = 60 # Set the sensitivity of the sensor | |
sense.color.integration_cycles = 64 # The interval at which the reading will be taken | |
# Add colour variables and image | |
o = (200,124,1) | |
b = (0,0,0) | |
g = (0,255,0) | |
pk = [ | |
b,b,o,o,g,o,b,b, | |
b,o,o,o,o,o,o,b, | |
o,b,b,o,o,b,b,o, | |
o,o,b,o,o,b,o,o, | |
o,o,o,o,o,o,o,o, | |
o,b,o,b,o,b,o,o, | |
b,o,b,o,b,o,o,b, | |
b,b,o,o,o,o,b,b | |
] | |
sense.set_pixels(pk) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment