Thursday, May 7, 2015

Sending a Raspberry Pi into Space(ish)

Day 1: The project team is formed
I've had a bunch of Raspberry Pis for a while and the girls in my coding club haven't really been interested. Today all that changed. I have found details on the Dexter Industries Brick Pi site for how to make a basic unmanned flight into the stratosphere with a Raspberry Pi. Once I showed them the video the girls were hooked.
We have now formed a team who are interested in running the project and there are some keen girls who have never programmed before wanting to have a go. Our MVP is to get a Weather Balloon launched with a Raspberry Pi payload, setup to take timelapse photographs and send GPS signal back to the ground crew -- and then to get it all back again at the end. There are some suggested features regarding Go Pros, altitude sensors and radio transmitters. One of the girls was so worried it would conk someone on the head that she wants it to play a "Get out of the way" sound on descent. We have Aviation rules to research and some GPIO programming to learn. We also need some awesome maths nerds to calculate how long it should be up there and where the heck it will come down.

This is exciting!

Thursday, February 19, 2015

Free Computer Posters

I don't know if this is useful to anyone. I need to decorate my classroom for an upcoming open day and I'm notoriously bad at printing stuff out. I don't have any budget for posters but I do have an a3 colour printer at my disposal so I knocked up some posters on Adobe Illustrator. I thought people might like copies for their own classrooms. I would definitely prefer these to be student work but it's only week 4 and we don't have anything as yet and I left it a bit late to ask the hobbyists. Comment if you use them. Creative Commons license Share and Share alike.


Click on the thumbnails for the PDFs.

Wednesday, February 11, 2015

Showing off some great kid work

At the end of last year I had my Year 10 students combine their multimedia skills and their programming skills with a Ren'Py project. The project brief was to create a "choose your own adventure" story using creative commons licensed images and reader interaction. term 4 flew by as it does each year with exams and final assemblies but a couple of the students finished a really high quality product. I have posted one here with Elizabeth's permission. I hope to post another one when I get it.
This is called "Plane Crash" and it's pretty well explained in the game what's going on. Be careful, there are a number of ways to die.

This is the link to the zip that installs the game files.

Please comment if you get a chance to download and play it so I can give the feedback to Elizabeth.

Tuesday, January 13, 2015

NCSS 2015 - Day 10

Amazing Teachers!!

We made it! 

There are some very tired people today; both tutors and kids. My 3 hours of sleep gives me a distinct edge over many of the others in my group so I'm hoping to get some Arduino play in. 
8:00AM: I got my cronut!
9:00AM: Roll call and the nutbush before going to SIT. The thinking may be impaired by lack of sleep already. Nutbush in the centre of a hall with sleeping heads on the floor surrounding is not a little fraught with danger.
9:15AM (ish): Head down to SIT. The kids in our group finished off the videos for our team presentation and I got to play with my joystick control code for the robot. Jim, who is extraordinarily generous with his time and expertise, scribbled all over this paper for me. I'm hoping I will still remember the gist after more sleep. If anyone cares it's the difference between switching and amplification using a transistor. Playing with Serial when pack up time was called.
11:30AM: Photo time! Teachers are awesome and these are the awesome teachers (except for Fiona) who have spent the last 10 days out of their depth.

1:00PM Lunch.
Slight holding pattern now.
2:00PM Final presentations at the new Charles Perkins Centre at the other side of the uni. Nearly there now...

The presentations are videos created by each group during the challenge; one covers the project they've been working on and one covers some aspect of the camp they're interested in. Our team did our project and "Life in embedded." The videos were really fun.

Highlights of the videos...
Group 1's project was a "Quest" sharing social media web app where you could set up a "Quest" or event and you can search events in a particular area (shown on a map).
Group 2's project was a social media web app (yes there is a theme) called Lyar where you get to post 2 truths and a lie and connections need to try to detect the lies for fame and glory.
Group 3's project was a social media web app where you can watch youtube movies synched with friends over the internet with an inbuilt chat function. this one was like magic to me. I have no idea how they hooked into the Youtube API so effectively in such little time. Go group 3!
Group 4's project was a social media web app running a trivia competition called "Quizzi" with interactions and competitions. Users can also add questions.

The other 3 teams, including mine were in the embedded stream so they weren't really showing their "product" as that was last night at the olympics but they were showing how the team worked. the videos were great and I might be biased but I think Group 7's were the best! Especially "Life in Embedded".

My family came to see the end of the presentations which was brilliant. Time to go home and recover/sleep now. I believe this post has been twice as many keystrokes because of all the typos I've had to undo. See you everyone, meet you on the web! I love this program ( if anyone gets an opportunity to come, they should.

NCSS 2015 - Day 9

By Bilboq, with color modifications by Singularity Utopia. [Public domain], via Wikimedia Commons

Delivery Day!!! 

If I survive this next 24 hours intact I have promised myself a cronut from the coffee shop (Campos) that we get our coffee from every morning. 
9:00AM: No Lecture in the morning. It was all about the project. We spent all morning working on getting the various bits of our project working together and building the bits to strap the sensors to human bodies.. 
11:30AM: Bored. This doesn't seem right, I should have something more to do. Started mucking around with my own robot.
12:30PM: The students all have mock interviews with sponsor organisations such as Atlassian, Freelancer, Google and Wisetech Global where they get put through 10 minutes of a legitimate inteview process and then get some feedback. I went into an interview to get some advice from some guys from Google as to what we can do to better prepare our students for this type of experience. They suggested getting kids to practise in timed conditions. They expressed concern with not being able to get enough Software Developers of a high enough calibre, I asked if that meant we needed to try to raise the calibre of all graduates and they seemed to think that raising the volume would suit them better so that the number of candidates in the top n proportion was greater. This seems kind of backwards to me.
12:45PM: Back to Women's college for lunch
2:00PM: Back from lunch. Decided to experiment with adding a digital accelerometer to the project to detect our "bow" movement. It started looking really good...

About afternoon tea time I had to discard my idea because the Serial Monitor stopped printing out my x, y, z, status and I was keen to actually get something working - I knew how to do that with the analogue accelerometer.
4:00PM Had to pack up and head to Engineering for a lecture by the head of the program Associate Professor @DrJamesCurran on his area of research and all you ever wanted to know about entrance scores to uni. (Arghgh! I want to start fixing my accelerometer issue but Arghgh I want to see the lecture... off I went to engineering.) Ever wondered why Google translate doesn't do a brilliant job of translating between languages? It turns out it's really hard! Go figure.
6:00PM: Dinner
7:00PM: Back at the labs. 2 hours to show a working demo (we can continue to tweak after that). I got the bow working with the second accelerometer and then went down to engineering to find out about the DropBears team in First Robotics. ( #AllTheCoolThings
9:30PM: We got a bit of an extension!  It now appears we have jump and punch being detected and sending te correct serial messages to two robots. W00t! Now to add in my two moves and we'll have a fully functioning game. We even have really pretty light up paper light diffusers.
10:30: ROBOLYMPICS! 3 embedded groups
split into 10 embedded games compete for the title of "We made the Python kids look most silly!" It's a fierce contest...
Thanks to Alex whose phone cam
worked better than mine.
Massive Success! Our team's robot competition "Bop it!" was a roaring triumph. The Python teams competed to race the robots to the finish line. Our robots lit up with a red, green or blue light which indicated the move the competitor needed to make (punch, jump and arm raise from their side respectively). If they got the move correct in the time allocated their robot went forward and if they didn't, their robot went backwards. The aim: get to the finish line. It went off brilliantly and victims (um, I mean competitors) were jumping and punching and lifting with abandon. I've attached a video below. I was really proud of our team and we managed to debug the last of our glitches (that the robots appeared to go backwards randomly at some point in time) while everyone was playing - overflow error - newbie mistake : )

12:30PM: Pizza! After the Robolympics we had a pizza break. So... much... food... We then did a tidy up of the lab to give it to the web teams who are still working on their projects.

Jim's Lecture: At 1:10 we had our final Arduino lecture for the program. We can apparently use any code we like if we have some functions that will upload it to the boards - so excited! I can use something that knows how to format code properly. We then did an overview of some of the available boards.

  • Leonardo -upgraded Uno - 2 serial ports ($40?)
  • Aduino Pro Mini - teeny tiny ($5!)
  • Arduino Due (32 bit, 96k RAM, 54 pins ($60)

We then talked about possible future projects and Jim told us about his projects he uses with his sailing. "Sometimes you just have to do the practical thing that works rather than doing the best possible thing. Wires are awesome because they work."

2:20AM: Tutors embarrass themselves There is a tradition at NCSS that the tutors put together an entertaining video as a surprise for the campers at 2AM. This year there were three and a returning students video. They were great! Another rason to come if you ever get an opportunity. Things go downhill pretty fast after that and it's not long before people are heading back to the college or falling asleep on the floor.

 4:00AM Crawl to bed

Sunday, January 11, 2015

NCSS 2015 - Day 8

It's the last day and night before the all-nighter. Last year I lasted until 3:30AM on the all-nighter. There were a bunch of the kids that made it but many of them slept under desks and that's just a little cheating. Not sure I'm going to make even 3AM this year. I'm already so tired! Expect today's nites to be shorter and maybe less lucid than previous.

Thank you Vijay garg 10 for the use of your curve.
Lecture 10: DAC
We talked about the trade-offs of Accuracy vs Cost vs Size of components. The plot precision is obviously limited by the clock speed of the sampler and the time intervals cannot change within the samples. Emma gave us some code for writing our own Digital to Analogue converter using PWM (some of which we've encountered before) that would handle two PWMs. She then went on to signal processing and talked about sliding window average using a set of data in an array with a moving starting pointer. (This was pretty geeky stuff.)

Lab 9: Team meeting. What is Minimum Viable Product? We discussed how to scale back our "Bop-it" idea so that we can have something made and into testing and then move onto the bits that are less necessary. We managed to split our team of 6 into 3 sub-teams, each with a task for the day. Team 0-A were working on detecting a jump spike on the accelerometer, team 0-B were working on getting the robot to take a data stream and move accordingly and team 0-C (my team) were working on accelerometer calibration (to remove noise) and then working on an arm lift. Despite a teacher meeting interrupting our play and having to barricade our circuitry so noone tried to pack up before we were finished, we did get it done!

Lab 10: More of the same. It's all about the project from now on. I was pretty happy that I actually got the calibration and arm raise detect working. Electronics is still frustrating! You can see a buzzer on my breadboard that beeps an A above Middle c when you get your hand into the starting position and then plays the c above middle c (ish) when you get to the correct finishing position. Yay!

Interesting Stuff Learned: Windows 8.1 completely failed to work on me twice so I ended up using Fedora (they have dual boot in the labs). This was interesting and now that I'm a crack linux user I can, of course, feel superior to everyone around me. : )
I also learned about using Git with terminal. I have used github before but not quite so text-basedly. I'm so #l33t

Evening Activity: The Simulation: This is an evening of the geekiest theatre sports of all time. The teams compete to do recognizable renditions of computing processes in timed conditions. It's bedlam! In an effort to maintain full dislosure, I missed it, going out to watch Into the Woods at Randwock Ritz with my family. It's been pretty hard being without them this year so the visits are very welcome.

Murder Game 2.0: still undead. I think everyone's too busy/tired to be playing.

NCSS 2015 - Day 7

Thanks to EFF-Graphics for the use of their image
Back to Lectures and Labs.

Lecture 8:
Covered the way Bluetooth (named after a scandawegian pirate king Arrr!) works. There was talk about stacks and more acronyms than should rightly be introduced at one time. I feel fuzzy about this stuff (bad war flashbacks to Data Comms at uni). I did get the stuff about AT commands and their syntax (a good this to get). It's necessary to get the Bluetooth modules talking to each other for the project.

Lab 7: 
BLUETOOTH! We took a pair of Bluetooth chips (master and slave) and got them set up to send and receive messages. Much of the lab time in the morning was taken up with planning the video our team is making.We then only just had the circuit set up to send a signal from a soft potentiometer across Bluetooth to a buzzer on the other circuit when time was called D'oh!

Soft potentiometer in the foreground and buzzer in the background.
Lecture 9: ADC (Analogue to Digital Conversion). We talked about the requirements of ADC and it was really interesting to think about sampling in terms of the electronics rather than just generally. A continuous stream of data (Analogue) is not possible to represent on a digital device without infinite memory. The ADC has a resolution and a quantisation. Resolution being the range of values and the precision of those values. Quantisation is the clock speed and the resulting sample rate. (If you don't need that level of accuracy, you can use less than the maximum sample rate e.g. temp sensor for an airconditioner)

Out of interest, even exciting looking insects like Sydney Uni!
Lab 8: We get our teams and decide projects and get our ROBOTS! This lab was a time of pitching and negotiation between team members. There will be a Robolympics on the all nighter (Monday night) and we will be having volunteers from the Python teams to compete in our "challenge". First we had to define our challenge. Our team came up with 2 nice ideas: one was a robot race between 2 robots driven by people with arms outstretched (think zombies) left arm will steer depending on angle and right arm will drive speed forwards base upon up down movement -- in order to make it trickier, right arm will be weighted by something. The other idea was to have a "Bop it" type game where in stead of the small inputs that the game "Bop it" uses, we define big movements like windmill arms, planking, jogging etc and tell the user which to do based upon a light on the robot. The robots moves along the floor a set amount based upon the number of moves done in an amount of time and then the winner is the robot that reaches the end first. After much discussion our team went with the "Bop it" idea. (This is still in fleshing out stage so some of this might change.) we then got our robot moving around the table and following instructions. That's half the project done right?

Interesting Stuff Learned

Evening Activity: Cryptography Challenge. I have done this challenge twice and both times I have completely failed at it. I don't think I'm going to be working for ASIO any time soon. There are a bunch of teams who have a tutorial to follow and a two computers and one is meant to be used to decrypt existing codes and one should be used to write encryption functions. I had a really good idea for a decent encryption but based on tiredness, logic errors and lack of proficiency with Python I got it debugged just after the closing bell. (2 hours of frustration!!) I don't deal with that level of frustration well. Congratulations to all the amazing teams who managed much more than I did.

Murder: I am now undead.