CoderDojo Athenry at Minevention

Minevention2016.JPG

Well done to everybody at CoderDojo Athenry who participated in Minevention 2016 in the Radisson Hotel Galway on 26 and 27 November.

Our stand looked great, with the Pi-based games console, a TV showing the Athenry Castle Minecraft model, the Oculus Rift demoing a Unity game, one of the Bodger’s robots, members with their laptops demoing Scratch programs and Minecraft modding, and a 3D printer on the first day.

We were very proud of our ninjas who are fantastic ambassadors for CoderDojo! Thank you for all of your great work!

In addition, thanks very much to Lisa O’Brien and the Minevention team for allowing us to participate, and for inviting me to give a presentation about CoderDojo.

Creators – Finishing Pin Bowling

This week, despite a small group, we finished off the Pin Bowling game. After Christmas we’ll move onto a different game – most likely something 1st person in design.

UI Elements – Text and Buttons

We added two UI Text elements to our game and aligned them to the top left and top right hand corners respectively. One is used for showing the current score and one is used for showing the number of shots remaining. Note that when we add UI elements, Unity automatically adds a Canvas and an EventSystem for us.

UI elements don’t have a standard Transform component, instead they have a RectTransform component which is used to describe their position within their Canvas. To align to a particular location we click on the square below the words “Rect Transform” and select how we’d like to align within the Canvas by clicking one of the options while holding the Shift and Alt keys to set both the pivot and position.

screen-shot-2016-11-29-at-22-41-48

Continue reading

Bodgers – BackTo Basics

Hi again everybody.

Over the last couple of Saturdays the bodgers group have been preparing to build our own circuits. Two weeks ago we looked at some of the theory behind electronics, how the GPIO pins on the Raspberry Pi work, how to use GPIO Zero the main Python module we will use and we watched some videos which explained how some of the components we will be using work together. Last Saturday we built some simple circuits.

The first circuit shown above uses GPIO pin 17 to light a LED and the second uses GPIO 2 to read from push button switch. Here are my slides from both sessions back-to-basics.

As we have only a short session next week and the Christmas party is the following week we will return to building circuits after the Christmas break.

Next week I will demonstrate some of the tools I use to set up the Raspberry Pi, this will include tools to format and write to SD cards and tools for finding the IP address of your Raspberry Pi. I will also do a very basic overview of the Arduino. So if you have or are hoping to get some hardware to experiment with at home this session shouldn’t be missed.

I will also talk about what looks like a cool new challenge from the Raspberry Pi Foundation.

See you all next week.

Week 9, Explorers – Pen Commands

Hello Everyone,

Thank you all for coming again this week. This week we looked at pen commands, we have not done this before in the Explorers group so it was new for everyone.

pencommand

We also created some variables which we set as sliders which again is something we had not done before with this group.sliders

And lastly we added buttons to our game. We added two separate buttons, a Start and Stop.

Here are the full Pdf version of my notes from this weeks session. cda-s6-challenge-pen-command.pdf

Martha

Special Event on 3 December: Dick Baldwin’s Little Sailboats

We will have what should be a very interesting set of speakers at CoderDojo Athenry on 3 December for the second half of the session (starting around 1pm).

Dick Baldwin, a sailor based in Maine, USA, sends 5 foot long unmanned, GPS monitored sailboats out into the sea. Recently, one of the little sail boats, Lancer, arrived in Ireland and was picked up by 8 year old primary schoolgirl Méabh in Leitir Móir, Connemara. Her school hopes to relaunch it next year, with the help of The Marine Institute.

We will have interactive presentations via Skype from Dick Baldwin and Ariadne Dimoulas of the Educational Passages project, and Méabh will come along in person to tell us about finding the boat. In addition, Dr Margaret Rae of the Marine Institute (who is a CoderDojo Athenry mom!) will be on hand to explain more about the project and maybe answer your questions about what the Marine Institute does and how important technology is for its research.

Below is a summary of the presentation. It should be really interesting! Thanks a million to Margaret and the Marine Institute for setting this up.

One never knows what’s going to happen when a small boat goes to sea. This presentation is about sending 5foot unmanned, GPS monitored sailboats out into the sea where every voyage is different and the learning opportunities are great. These little sailboats follow the winds and currents and will sail for months & months often crossing oceans and reporting its position and scientific data along the way. 

A group like yours could equip a boat with an array of scientific sensors to monitor atmospheric and ocean data. You could also include a solar panel and maybe a camera or possibly even add steering capabilities to your boat. Think of the data you could collect and what it would be like when your boat comes ashore in far- away lands. Will you be able to communicate with them and what would you ask them to do with our boat?  Let’s explore the possibilities.

Creators – Texturing in Blender & Importing Into Unity

This week we finished off texturing our bowling pin model in Blender and then imported it into Unity to use in our game.

UV Unwrap

We started by loading our existing bowling pin model with seams already marked.

The process of unwrapping a 3D model is similar to peeling an orange and pressing the skin flat. The seams we marked are like cuts in the orange’s skin. When we peel it, the pieces between the seams come out separated.

To unpeel the model we entered Edit Mode (TAB key), selected the entire model (A key) and chose UV Unwrap | Unwrap from the Mesh menu. Notice that we don’t see impact of this until we switch to the UV/Image Editor

 

Switching to UV/Image Editor

Our main panel is normally in 3D View mode. To start working with our texture we click on the icon to the left of the menu options and choose “UV/Image Editor”.

When we change mode we see a flat image with our model split apart and spread out into flat sections. Each of these sections represents a part of our model between a set of seams.

W

 

Moving Regions Around

Painting

Previewing

Saving Texture to File

Exporting Model from Blender

Importing Model into Unity

Replacing Our Existing Pin Prefab

Test

Advancers P5 Week 3: Our first game

Click “Run Pen” followed by “Edit on Codepen” to view the game and play with the code.  At this stage, codepen has been working well for us so I think it’s a really good idea for you all to register for an account on codepen.  This will allow you to “copy” my sketches so you can save your versions of them online.  As we get more advanced (or if the network is down), we will start working locally with Atom again but this is good for us.

Today we started writing our first javascript game.  We thought for a bit about which game might be good to start and decided on a version of the hit game Flappy Bird.  We got quite far before people started to tire!

It will take another session to finish the game – we might do this next week, or take a break from javascript and come back to it in the new year.

Writing the Game

The first step was to plan how we would do the game.  Like all projects, we build it up in steps.  These steps would work to build a basic flappy bird:

Step 1: Draw the sky

Step 2: Draw the ground

Step 3: Draw the bird

Step 4: Make the bird fall

Step 5: Make the bird stop falling when it hits the ground

Step 6: Make the bird jump/flap when the mouse pressed / screen touched

Step 7: Add pipes as obstacles with a random gap

Step 8: Move the pipes towards the bird

Step 9: When the pipes go offscreen on the left, make them appear on the right again

Step 10: Check if the pipe is hitting the bird and restart of it does

Step 11: Add a distance label (how many pipes have we passed)

Step 12: Add sound, improve the graphics and keep a “high” score

We got as far as Step 6.  The next 6 steps would need another week to cover.  I’ve added comments to the code so you can see which parts of the code relate to which steps.  If you have your own codepen account, it might be a good idea to attempt to do the rest of the game – you might get stuck but that’s part of the fun!

New Concepts we covered today:

  • Variables.  Variables in javascript are just like variables in scratch.  The key things about variable are:
    • You create a new variable by writing the word “var” followed by the variable name.  E.g. we wrote the variables:
      • var birdHeight;
      • var gravity = 0.5;
      • Creating a variable by writing the word “var” is called “declaring” a variable.
    • You can change the value of a variable by using “=”
      • birdHeight = 10;
    • You can also use a variable name in assignment, so e.g. we could make the birdHeight 1 bigger by writing:
      • birdHeight = birdHeight + 1;
    • We learned that if you want to be able to see a variable everywhere, we need to declare it
  • Math operators:
    • We learned that some of these are written a bit differently in computer programs:
      • / is how we write “divided by” – e.g. width/2 is the same as writing “width divided by two”.  This is because on a keyboard for some reason there isn’t the ÷ symbol.
      • * is how we write “multiplied by” e.g. 2 * 2 is the same as writing “two multiplied by two”.  This is because x is very easy to confuse with lowercase x.  So if you had a variable called x things would get confusing!

Hackers – Disassembling Stuff!

A great way to figure out how things work is to take them apart. In the Hackers group, we unscrewed, hammered, de-soldered and detached the parts from the insides of an old living-room DVD player, a computer CD player, and a speaker from a stereo, to see what we could find.

Group members de-soldered components such as switches and capacitors that we will use in new projects, extracted and examined motors from the CD/DVD players, and got a working speaker from its housing. They powered up the motors with DC batteries to see how they work, and hooked up the speaker to a phone headphone jack (whch worked but would need amplification).

CDs and DVDs are great because they include different high-quality motors for spinning the disc, moving the laser read head forward/backward, and ejecting the tray.

Week 7 – 2016 – Explorers

Hello everyone.

Good to see everyone there on Saturday. We made a game t similar to on old game called Breakout.

wipeout

We used a number of important coding concepts again this week, loops and decisions, Variables, broadcasting, etc.

concepts

During class, we didn’t have time to add the Lives and the Scores but we will continue with the game on Saturday.

Here is a link to the notes: cda-s6-week_07-breakout.pdf

 

Martha