Hack 1: Binary Twitter HackBinary is the basic language of a computer. Values that can be stored and then manipulated or converted into a new value. This value can then be interpreted into sound, letters, pictures and many other elements. In GCSE Computing students learn how Binary is used to represent letters and characters, I wanted them to be able to see this in action in an inspiring way. Using the Sense HAT and Twitter I have created a program which retrieves a tweet from my timeline. It then uses the Python codeline: word = bin(int(binascii.hexlify(Tweet), 16))
This line converts each letter in the tweet into a binary value. Then the value, either 1 or O is displayed on the Sense HAT’s LED matrix. Each tweet is converted into a Binary representation of the message. |
In Action |
Hack 2: R.P.S.L.SYou will know that Rock-paper-scissors is a hand game usually played between two people, in which each player simultaneously forms one of three shapes with an outstretched hand. These shapes are "rock" (a simple fist), "paper" (a flat hand), and "scissors" (a fi_st with the index and middle fingers together forming a V). The issue is that the game has only three possible outcomes other than a tie which means it is very easy to predict or guess your opponents hand. This where the new game comes in, "rock-paper-scissors-Spock-lizard", invented by Sam Kass and Karen Bryla. This version adds "Spock" and "lizard" to the standard three choices. "Spock" is signified with the Star Trek Vulcan salute, while "lizard" is shown by forming the hand into a sock-puppet-like mouth. Spock smashes scissors and vaporizes rock; he is poisoned by lizard and is disproved by paper. Lizard poisons Spock and eats paper; it is crushed by rock and decapitated by scissor making the game more exciting, random and stimulating!
You can play a version for yourself which I coded in Python, the real hack is adapting the code and using the SenseHAT hardware to add the new features and make the overall experience more interactive. PyGame was used to add joystick controls to enbale the player to make a selection, spock, lizrd etc. Messages atre scrolled to update the player on the game and who has won, the computer or the player. Final I used SenseHAT Paint and 8x8GridDraw to create the LED images for the game. Watch the videos below to learnt the rules and see the RPSLS in action, then download the code and have a go yourself. |
Play the Game |
|
|
Hack 5: MP3 Player
The AWESOME MP3PLAYER created and coded with three excellent students. It features the following:
Selecting a Song: Use the joystick to move around the blue area, you will see the letter for each song displayed. Adjust the Volume: Now that the song is playing you can adjust the volume by moving to the green dot and pressing the joystick in, Enter. Look for the ‘#’ symbol. Reset button: The orange button is located at the bottom right row, second from the end. This button is identified by the ‘@’ symbol. End: The red dot displayed with the ‘%’ symbol ends the program, navigate to the positon and press Enter on the joystick. The program ends Moods : Within the MP3 player are four ‘mood’ playlists, identified by the teal LEDs. Scroll down to and hover over one. The ‘mood’ number will be displayed. Thinking, Relaxing, ISS Party and Bowie Tribute. Playlist: There are also four ‘genre’ playlists, identified by the yellow LEDs. The playlists are as follows: Rock, Rap / RnB, Space and Sonic Pi winners. Instructions: The white dot is the instruction button, this displays a letter ‘i’. Select and you will be treated to a guided tour of the MP3s features. |
Students Discuss What They Made
|
Hack 6: Battleships in Action |
SenseHAT BattleshipsThe classic game of Battleships on the Raspberry Pi SenseHAT. The program creates a random layout of boats, ammo and water. Use the joystick to select a location and then press Enter to fire a Torpedo.
If you miss you will here a splash of water, if you hit then you will hear the explosion. Else you may find an ammo dump. Each square is then coloured, blue for water, red for a ship and yellow for ammo. You will be updated n the number of ships left to destroy. When you have used all your Torpedoes up or you have destroyed all the ships, then game ends and you are updated with your score. You can select to play again and a new random layout is created, or leave the game. |