Raspberry Pi Roundup - A review of our new controller, a Star Wars duel and an artificial life project
Controller Review & EduKit 3 link-up
The Pi Hut recently launched a new PS3-style controller. I was sent one, had a play, liked it and soon adapted Tom Oinn’s great Python ‘input’ library to accept commands from the controller. I also adapted one of Tom’s demo scripts to use GPIO Zero to control the CamJam EduKit 3 motor controller board. You can read how to use the controller with EduKit 3 here. All credit to Tom for making his library accessible, and thanks for accepting my changes for the new controller.
Mark Heywood has just written a review of the controller over on his blog, and you should take a read of that to find out more.
Star Wars Duel!
California-based Richard Arellano has developed this lovely live-action Star Wars duel. It features a Raspberry Pi with camera module pointing at two Star Wars figures of Yoda and a Sith Lord. These figures are sat on a motor a-piece and you can control:
- The lighting
- Which character takes a light sabre swipe at the other
- The message that appears on the LCD screen.
- Create a number of artificial lifeforms that can move around a board and have colour/movement properties assigned to them via 3 random numbers; the ‘DNA’ of the life-form – and display them onto an easy-to-observe output.
- Have those artificial lifeforms be able to interact with each other to ‘breed’ and pass along their traits to offspring, as well as ‘kill’ each other to keep the population in check.
- Have random chance for ‘genetic chaos’ whereby instead of passing along a life-form’s properties to its offspring a random number is inserted into the offspring’s ‘DNA’.
- BONUS – plug the code into the Minecraft API and see what random patterns of blocks can be spawned from the artificial life-form’s movements and properties.
The script takes in the following parameters:
- Number of lifeforms to start with.
- The speed of the program.
- The maximum number of lifeforms that can be ‘on screen’ at any one time.
- Maximum lifeform lifespan.
- An “aggression factor” controlling how likely a lifeform will be to attack another.
It’s a wonderful project and you can read more (and download the code) here.