Using gpio triggers / switches 3 demos.
All of these three demos use GPIO PIN 3 as a trigger.Demo 1 / Scalable housing
This code will allow you to use gpio PIN 3 and GND with two male to female jumper cables attached as a switch / or trigger for an event in Minecraft. This example triggers an question to ask you how many houses you would like in a row/ street. After typing this in you it then renders the "street" in your Minecraft world. Which needs to be open before you execute the code or else it will give an error.What you will need:
- Two female to male jumper cables
- Raspberry Pi
- Minecraft Pi installed the code from below
Code
You can download the code from hereDemo 3: Storm Trooper and Rainbow Walls
This is 32block x 32 block grid animation. Coding wise its not as efficient as demo 2 but creates some nice effects. You can see what it does by clicking on the link to the video below.You can see the event working here:
linkCode
linkDemo 2: Pixel Cakes
This is a simplified version of the RPI pixelcakes activity which works with Micro:bit. You can see what it does by clicking on the link to the video below.You can see the event working here:
linkCode
linkEnjoy,
Chris
No comments:
Post a Comment