Project Analysis

David Whale sent my Mum some pointers on analysing my recent Pi Wars project so that I could make progress for next year’s competition.  This is an important skill for people like me to learn, who want to work in the computer programming industry when we’re older.  I made notes about my project on the day, and since then I’ve looked at how best to analyse relevant points, so that I can produce a more efficient project in the future.  I can use this template for my other projects, both in advance as well as retrospect.

Project Analysis: PiWars Robot

Construction:

         Pros:

  • The chosen chassis material (laser cut acrylic) was sturdy and supported the hardware well.
  • It was a good idea incorporating pre-cut wiring holes in our design where we needed them, as this made assembly easier.

         Cons:

  • The messy wiring made it hard to locate and fix wiring problems.
  • I didn’t double check the measurements when I laser cut the chassis, meaning that it ended up being the wrong size for our design plan.
  • It was hard to see whether the ball was aligned with the built-in curve or not during the skittles and golf challenges.

         Conclusion:

  • Acrylic makes a good, strong chassis.
  • Pre-cut wire holes are convenient.
  • I need to plan better how to organise the various wires.
  • I need to double check any measurements before laser-cutting the chassis.

 

Traction:

         Pros:

  • The tyres had a decent grip, just not enough power from the motors.

         Cons:

  • The motors weren’t very strong and not able to meet the demands of the competition.

         Conclusion:

  • Strong motors are essential for competing in PiWars.

Power:

         Pros:

  • Our rechargeable battery packs for the Raspberry Pis were convenient size-wise.
  • The motors stayed powered throughout the whole competition using 4 AA batteries. Our LEDs also remained powered for the duration from button cell batteries.

         Cons:

  • The controller pi’s battery didn’t last for more than a few hours between charges, which created problems during the competition.

         Conclusion:

  • We could do with a better power source for the main RPi.
  • Batteries work well for motors and LEDs.

Lights:

         Pros:

  • The lights looked awesome on the robot.
  • They stayed lit throughout the entire competition.

         Cons:

  • The Astro Pi failed to read its program partway through the day, meaning that it got stuck on a static rainbow colour.

         Conclusion:

  • The lights were awesome! We should use similar things again.
  • I should test things like my Astro Pi program more thoroughly in advance, to have time to troubleshoot problems.

Control and Steering:

         Pros:

  • The miniature keyboard allowed me to start programs without scrolling through a list, as I would have to had done if I was using the Wii remote.
  • The keypad doesn’t require manual pairing each time the program is run, unlike the Wii remote.

         Cons:

  • Steering was awkward and difficult using the keypad, which cost me points in the various challenges. Steering with the Wii remote was considerably easier and smoother.

         Conclusion:

  • Ideally, it would be a good idea to combine the two, if possible.
  • For the sake of scoring well in the challenges, the better controller would be the Wii remote.

Attachments:

         Pros:

  • The right sensors were used for each job.

         Cons:

  • I didn’t start testing on the sensors early enough, and was unable to get them to work as needed in time.
  • I should have measured the correct distance above the floor for the line follower.
  • I should have measured the range of the distance sensors before creating the final design.

         Conclusion:

  • Testing the sensors well in advance is vital. This includes getting the correct measurements for each sensor.

Decoration and Style:

         Pros:

  • The robot looked awesome! Jim Darby said that an incredible mind must have designed it!
  • The robot won the funniest robot prize.

         Cons:

  • The decoration got in the way when we needed to access the inside wiring.

         Conclusion:

  • Similar decoration to what we had would be great!
  • We could do with making some of the decoration easily removable for when something goes wrong on the inside of the robot.

Key Points:

  • Early and thorough testing is vital, project plans could help with this.
  • Powerful motors are vital (i.e. proper motors, not beginner kit motors)
  • A responsive, smooth controller (i.e. Wii remote) is important for remote control challenges.
  • TEST WELL IN ADVANCE! That way any problems allow for troubleshooting time.
  • A good power source (i.e. Longer lasting than a mobile charger pack) is important.
  • Tidy wiring is also important.
  • It’s helpful to look at what’s gone right with previous projects, as well as what’s gone wrong.

 

Projects I’ve Been Working On

Hi guys! CrazySqueak here! Today I’d like to show you some of the projects I have been working on.

ProcBeats

procbeats

ProcBeats is a rhythm game made using Processing.

I hit a bit of a snag when I found out that the sound library only works in the 64-bit version though (I was coding on a Raspberry Pi.)  Sadly it means that for now I won’t be finishing this particular project then!

You control the gameplay alone using the 1,2,3, and 0 keys.

You can download the sketch with a test level here.

SkedMan

skedman
SkedMan is a Raspberry Pi only schedule/homework manager for kids and teens.

This is my first program to come with an installer, instead of requiring you to manually run commands.

Install by running the command wget https://www.dropbox.com/s/ey3u1iu11ep3d6v/install.sh?dl=0; bash install.sh?dl=0 in the terminal, and let me know what you think.

SqueakTweets

squeaktweets
SqueakTweets (Internally known as JokeBot) is a Twitter program that tweets jokes every three hours with the hashtag #CrazySqueakJokes.

I did a little video about it as part of the Raspberry Pi Foundation’s Young Pioneers #makeyourideas competition, which you can watch here.

The tweets are posted on the twitter account @CSqueakTweets.

You can download the code to have a look here.

I hope you like my programs! Feedback is always welcome.

My Minecraft Minigames

WARNING: This program is not compatible with PC or Python 2: please use a Raspberry Pi and Python 3 to run

Hi readers, it’s CrazySqueak here, I’ve recently exhibited a few projects at Southend Jam and this is one of them.

I’ve written a Minecraft game called McPiWare. The aim of the game is to earn as many points as possible by completing minigames. The minigames occur in a set order and keep coming until you fail at one of them. There is also a bonus round that first occurs when you reach 20 points, and then it multiplies the score required for the bonus round by three each time. You can find a list of the minigames below.

Name Objective Allocated time (secs) Win criteria Bonus points awarded Notes
 Flowers Pick all the flowers  10
  •  The player has picked all the flowers
  •  (0-5) for speed
 Speed bonus is near-impossible to obtain without cheating
 Parkour Land on as many blocks as possible  15
  •  The player has landed on at least five obsidian blocks
  •  (0-any) for each extra block landed on
 Blocks turn to glowing obsidian when landed on, only landing on normal obsidian counts
 Survive  Don’t fall down 30
  •  The player has at least 1 life left at the end
  •  (0-4) for lives left
 The minigame instantly ends if you run out of lives
 Treasure  Find as much treasure as you can  30
  •  The player has found at least 1 treasure block
  •  (0-any) for extra treasure found
 Searching is done by right-clicking grass near cobblestone or farmland while holding a sword
 Miner  Mine as many diamonds as you can  15
  •  The player has mined at least one diamond ore
  •  (0-any) for extra diamonds found
 You will see text in chat when you are near diamonds, diamons are hidden under the layer of stone
 Bonus (aka Path)  Move from the gold block to the diamond block as many times as you can without falling down  15  You complete this minigame no matter what
  •  (0-any) for paths cleared
  • (0-any) bonus points
 Falling down instantly ends the minigame

I’m really pleased with how this game turned out, especially the built in leaderboard which means you can invite your friends over to compete with you. The leaderboard starts with some pre-set scores so it takes a master of the game to achieve the top ranking score.

Feel free to download and share my project but please leave credit to me for creating the original program. I hope it will be included in the next Minecraft Pi hackpack too!

What I’ve been doing on Codecademy

I’ve recently been doing a lot on Codecademy, which is a website where you can learn programming languages by working through free online courses. You can visit the website here.

I have been working through the Ruby and Javascript courses. On Javascript I’ve reached Unit 3, which is about ‘for loops’, and on Ruby I’ve reached part 2 of unit 2 which I’m looking forward to, as I’ve found the course very interesting and educational so far.

You can get started with Codecademy yourself by registering for a free account on the website and finding a course to start.

An overview of my progress

Completed courses:

  • Master the command line

In progress courses:

  • Javascript (27%)
  • HTML and CSS (25%)
  • Ruby (16%)
  • PHP (20%)

 

In my opinion Codecademy is a great learning tool for people who want to learn new programming languages, or learn more about programming languages they already know a bit about. It’s helping me to learn lots of functions that I never knew that I could use in a programming language before.

My visit to Koyoki video games in London

Hi guys, I visited a video games company’s office yesterday (actually the offices of three different companies but they were in the same building.)

I met the person that invited me at Chelmsford Jam (where I was demonstrating some of my projects.)  He’s called David Hasovic and he owns Koyoki Limited.  I thought he was great, and really enjoyed listening to all the things he was able to tell me about the work he does.

We started by seeing the rooftop terrace and then we got round to seeing the offices and having a look at the games.

When I first went into the Koyoki office, I was really surprised and pleased.  I’ve never been in a professional programmer’s office before, so it was exciting for me to see what it’s really like to work as a game developer.  I liked that they are a small company and that their office is nice and quiet – I’d love to work somewhere like that when I’m older.

It was interesting how everybody had their own part of the game that they work on in lots of detail, and to see how much information needs to be stored for various aspects of the game to work.  I got to see processes being used that I’ve only read about in books before too, so that was really interesting.

Everybody was friendly, and I was allowed to pull up a chair or stand next to people, to see what they were working on up close.  They explained to me what they were doing and answered some questions for me too.

The people in Koyoki games were developing a game called Forces of Freedom, which is an army type strategy game played on tablets or mobiles.  You can find it here: forcesoffreedom.com  It’s not the kind of game I would normally play because I’m 10 and there are guns and things in it, but I did get to try out a little bit to see how the program works.  I liked how the sound effects and speed your character is moving at are programmed to change depending on what terrain you’re on.  So if you’re on a bridge, you hear thudding footsteps, and if you’re climbing a hill, your character moves a bit slower – like you would do in real life.

It was a great experience to see how all the files and bits of code come together to create professional games like this, and to learn about how the processes work (e.g. how each person has responsibility for specific parts of the overall program.)

Another company I saw was creating an update for a game called Pocket Mortys (that is actually how it’s spelt, not a me making a typo), which is based on an episode of a TV show called Rick and Morty (you can view the trailer for the app here).  They let me have a go on the apps they were developing as well.

At the end of my visit, David gave me a free book about Refactoring my code to take home with me.  It’s a really big book that I’m looking forward to reading!  I love computer programming manuals and this one should help me to understand how to get my own code to work as best as it can.

I’m feeling inspired to try and set up my own network after my visit, as that’s not something I’ve done before.  I’ll keep you guys posted when I’ve made a start on that. Thank you to David Hasovic for inviting me, and to everyone for being so friendly and helpful.  I learnt a lot and really enjoyed my visit!

Below: Pictures of my visit

Find the block game

Hi guys, I’ve just written a find the block game in minecraft pi that uses the gpio pins. It uses the pins to power LEDs that tell you how close you are to the block. The game tells you how to play before the main part starts.

To play this game, you need to connect some LEDs to the pins, the LED colours and the pins to connect them to are in the table below (Instructions are written for a raspberry pi B+/2/3 so consult your own raspberry pi leaf diagram if your raspberry pi is different):

GPIO pin Led colour
2 Red
3 Yellow
4 Green

You can download my program here.

Install and run is simple, set up the circuit (Remember to use resistors with the LEDs), make sure you have python and RPi.GPIO installed, and run the program normally (Make sure you have Minecraft pi open and a world loaded before running).

The video below is of the game in action.

I hope you enjoy playing my game.

Completing my ECDL

Yesterday, I completed the last 2 exams for my ECDL (ECDL stands for European Computer Driving License). It was only meant to be my penultimate exam (Excel), but after I’d finished that we asked if I could sit the last one (improving productivity)  as well and just pay another exam fee.

I passed both of these exams and my overall score equates to an A* GCSE, bet that’ll look good on my CV, especially as I did it at 10!

I completed the improving productivity exam in 15 minutes as well, the invigilator said that most students take the 1 hour that they are allowed to use for the test.

I’m feeling very pleased with myself for this achievement, and I hope I achieve more things like this in the future.

Programming a Lego mindstorm

Someone recently lent me their Lego mindstorm for me to have a play around with, and I’ve loved it.

I’ve mostly been programming it via bluetooth, because bluetooth is quick and easy to set up and use as long as you are able to interface with it using a computer. I’ve written a couple programs for it already which I’ve listed below:

  1. Anger.ev3:
    Makes the robot happy until you press the center click button on the robot, then it starts making noise, charging forward, and frantically moving anything on it that’s connected to a motor.
  2. Battle.ev3:
    Allows the robot to be controlled using a special remote; the controls are as follows:

    Button pressed What it does
    Top button Puts the robot to sleep (stops the engine sound, changes the eyes displayed on the screen to shut eyes and plays a snoring sound until you press another button) (The robot won’t do anything until you wake it up)
     Top left button  Moves the robot forward and changes the eyes displayed to eyes that are wide open
     Top right button  Makes the robot turn around and changes the eyes displayed to narrowed eyes that are pointing in a certain direction
    Bottom left button  Swings its back weapon back and forth once while changing the eyes displayed to evil eyes and playing the sound of someone shouting “HEY YA!”
     Bottom right button  Opens and closes its claws twice while playing a SNAP! sound and displaying open eyelids with spirals in the middle
     Touch Sensor (On the robot)  Plays a power down sound, changes the mindstorm’s eyes to tired eyes and the exits the program (This only works if the robot is awake)
     Nothing (If not asleep)  Keeps the eyes displayed as angry eyes and plays an engine sound

Here is a video of my battle program running on my lego mindstorm

I wish I didn’t have to give the robot back next week as I’m enjoying it so much. Thanks to Kurt because he is part of the family that lent me the mindstorm and was the one who earned the money that was used to buy the mindstorm in the first place, you can visit his website at http://morganelectronics.co.uk/.