Showing posts with label fun. Show all posts
Showing posts with label fun. Show all posts

Tuesday, August 21, 2018

Shakey Shakey - a game using title switches

For the most recent Egham Raspberry Jam @EghamJam we did two workshops.
One was NoPi Blinky, making LEDs blink without any programming. More to come on this as during the workshop we found a few typos.

The other was Shakey Shakey.

For the workshops my goal is to do something slightly different that not only teaches the attendees something new from either a programming or electronics standpoint but also shows them creative options.

Shakey Shakey was based around really simple tilt switches.  They're basically a small tube with a contact inside that moves as you tilt the tube.  Really simple and really cheap. On eBay UK they're about £1.50 for 20. So, ideal when you need a bunch for the Jam
Tilt Switch

The only other things needed then were some female-female jumper wires and some 2 core wire.
I cut the female-female wires in 2 giving me a pair of wires that had the female connectors on one end and bare wire the other.  Cut the 2 core wire into about 150cm lengths and used them to connect the switch to the other wires giving a nice long wire for the kids to shake without (hopefully) unplugging the wires or pulling on the Raspberry Pi.

With the hardware sorted I them did the worksheet which is available to download from GitHub along with other Jam worksheets.

Shakey Shakey worksheet
The worksheet goes through:

  • Connecting a tilt switch
  • Python code to read the switch and display how many times it connects
  • Adding a pause to deal with debouncing
  • Adding a second tilt switch
  • Updating the code so the switches have to be activated alternatively
  • Final update of the code to add a timeline making it into a game

We had a full workshop and the kids who took parts seemed to really enjoy the coding and then playing the new game they created.

At the end I challenged the participants to come back to the next Egham Raspberry Jam (21st October 2018) with their own program that uses the same tilt switch controllers.  The worksheet at the end gives some suggestions.  Here's looking forward to the 21st of October to see what fantastic creative ideas the kids come up with.





Friday, May 8, 2015

Created a game in Scratch

I came across some videos of Jeff Minter who created some amazingly original games in the 8 bit era and is still going strong developing new games today and it got me thinking of one of his stranger games that I remember playing on the Commodore VIC-20.
Meta Galactic Llama Battle at the Edge of Time.  Here's a video of it on the Commodore 64. I can't remember if I had it for the C64 as well, but definitely played it on the VIC-20


As with most of Jeff Minters games it kind of takes a slightly different approach.
You're a Llama at the bottom of the screen and you can move left and right.  You can exit one side of the screen and come in the other side as well.
You shoot lasers out of your mouth at 45 degrees and you have to shoot the spiders falling from the top of the screen.
If a spider reaches the ground it starts to crawl towards you making evasive action essential. 
All very interesting so far.  To add to the complexity and the control you can also raise and lower a ceiling for your laser to bounce off of to assist in shooting the spiders.

 I had great fun with this game all those years ago and so wanted to see if I could re-create something similar using Scratch.

After some fumbling I put created a little game inspired by the Llamas.

Below is the game and here is a Link to project on Scratch website if you want a peek inside. https://scratch.mit.edu/projects/61239650/




It's been fun developing a game in Scratch. I'm most definitely not an expert and I expect there are a lot of refinements that could be done to the code to improve the game but it plays similar to the original.  I hope you enjoy it.

Tuesday, October 14, 2014

5th Egham Raspberry Jam - 5th October - Report


A year after the 4th Egham Raspberry Jam the 5th Jam was held.
A bit of fun getting it organised but in the end it was really worth it.

I put the list in Eventbrite and the Raspberry Pi Forum with a month to go and began tweeting and spreading the word.

With such a long gap between Egham Jams I was wondering if people would turn up.

On the day about 40 people came which was fantastic and there was a brilliant variety of projects on show.

Everything from home made conductive paint being used to add glowing eyes to Halloween pictures to 3D printers controlled by Raspberry Pi.
There were (count them) 4 robotic arms. A scalextric controlled from Scratch. A section of model train train controlled using the DCC protocol from RISC OS.
A Thermal printer that gave you a crossword, word search or Sudoku at the touch of a button and a nice big robot that looked like it could do some serious moving.

Also Stephen Cornes did a fantastic timelapse video of the day. For some reason I cannot embed it here. Not sure why but the link is below.

https://www.youtube.com/watch?v=KeWLOsutLaI

Roll on the next Egham Raspberry Jam.


Below are some of the pictures from the day.

































Thursday, July 3, 2014

Paper Marble Run - something different no electronics

I'm a big fan of encouraging creativity with low cost resources. I previously hacked a £6.00 remote control car to control it from a Raspberry Pi using Scratch and used a low cost eBay robot vehicle deck and wheels with a clone Arduino Pro Mini (all in for <£15.00).

Well some people aren't that into electronics and programming but are still looking for creative solutions.

I came across Marble Runs/Roller Coasters that you can buy and did a search online and found you can make you own from copper wire and also from stiff paper (200gsm). Never one to miss a chance to try something new I looked at the videos and made up templates for the paper marble run sections and began construction


After a fair few iterations and a lot of really small pieces of tape to put the bits together I finally had a set of templates that can be used to make a paper marble run.

This is the first video of the marble run. I really like the funnel and also that the marble comes off the end just below the funnel and because the moment is right it drops into the next channel/track section.


There is a fair bit of work in getting it stable and modifying the length of the straights and the curves so they work.  This is real tinkerer construction as the parts are not perfect and the design is evolving so regularly pieces need to be shortened, or bits added or the angle of the track needs to be modified to make it work.
Great fun going through all of this and learning about the properties of the paper, how strong the tape is and how to keep the marble going.

I then extended the run another bit. I like this view. There is something pleasing to me about the curves on the left section.


Finally I added a bumpy track and also a 'ladder' (no idea if that's it's name but it's the name I use) and more curves. This made the whole think a lot taller and works well. It does kind of unbalance the look and style of the overall marble run, so I think it is less pleasing to the eye than the earlier version.  Feels like when a skyscraper adds a large antenna to the top to officially be taller.

Here's the final video of the current Marble Run.




Overall I'm happy with the results and plan to make more runs.  A nice way to spend an afternoon/evening being creative.