My Dice
Hello everyone! My project is a My Dice made with Python and a micro. When I shake the micro, it randomly chooses a number from 1 to 6 and displays a different face or image for each number. Number 1 shows an angry face, number 2 shows a sad face, number 3 shows a smiling face, number 4 shows a fabulous face, number 5 shows another funny face, and number 6 shows a happy face. My code uses while True, the accelerometer shake gesture, variables, conditions, and the display.show() function. I also learned how to use sleep() to control timing.
Attend our in-person Robotics & Math