I wanted to try something with my SenseHat again. When I discovered that Scratch3 has building blocks for the module, I thought of using the joystick to bring The Scratch Cat to different colour fields and then have the matrix light up in the same colour.
A simple test and some preparationTo test the connection between Scratch and my SenseHat first, I wanted to display the temperature by pressing the joystick:
and it works:
For the right design of the movement I mirrored the two costumes of Scratch-cat.
Now, we paint some circles in different colours on our stage
When we push the joystick upwards, Scratch-cat also moves upwards on the stage. The same happens when we press the joystick down, Scratch-cat then moves downwards. For now, we ignore the broadcasts, we use them later.
This is quite similar, but we need to change the costume of Scratch-cat.
To make the movement of Scratch-cat more realistic, we now create the broadcast for "move".
The last part is for the "colour sensing". As soon as Scratch-cat touches a colour field, the SenseHat should light up in the same colour. If the colour field is left, the lights of the SenseHat also go out.






Comments