Normally my school holidays are pretty laid back, a chance to catch-up on all the admin work that gets neglected during the Term. I was also really looking forward to some uninterrupted time to be able to finish up the new EV3 book, just in time for the August release date. For some reason however, this turned out to be my busiest School holidays in a very long time.
I ran two Robotics workshops for the Queensland Gifted and Talented Association, two Robotics / Scratch Programming workshops for MENSA children and an all day "Create your own computer games" workshop for The Engineering Links group. Throw in a Stop-Motion animation workshop for a home schoolers group and some incidental IT support for a conference down the Gold Coast and these last two weeks have just flown by!
Fingers crossed I can find enough time to get my EV3 book ready on time!
After being able to see the EV3 hardware for the last few months, it's really exciting to be able to now show off the new software.
This is just a taster, and I'll get into more detail in future posts.
The new software follows on from the NXT-G software, in that it remains graphically based. This is fantastic for first time users as well as the younger students. For those looking for more powerful languages, there is LabView and RobotC to keep you satisfied.
The Palette of Blocks has now been moved to the bottom and the "Common' Palette has been removed. All the Blocks are available all the time.
For those of you familiar with the WeDo software, it has a lot of familiarity. This will be very beneficial for those students transitioning.
One of the big changes is how the blocks display their parameter information. In NXT-G, you had the Configuration Panel. That was great, it had a lot of information there, but once you clicked to another block you couldn't see the info any longer. With the EV3 software however you can see all the info on the block itself. No more clicking through every block to understand a program. This will be a huge help to teachers, as often we are just glancing over students shoulders to see their work, and this will allow us to understand the whole program without taking control of the mouse.
This block I have set up to drive straight ahead, 67% power, for 5 rotations and the Brake at the end. The motors are connected to Ports B and C.
This one is setup to drive gently to the left, -35% power (backwards), for 3.7 seconds.
Setting the Parameters
Setting the Parameters is really nicely handled as well. Every Block has a Mode Selector which governs the main function of the Block. In the above example that means determining if you are working in Seconds, Degrees, Rotations etc.
If there is a number required, on nearly all the blocks you are given the option of typing in a number or moving a slider bar, very handy indeed.
Data wires in NXT-G were messy, and while it would be impossible to simplify them entirely, the EV3 software does a much better job in managing them and figuring out where they go.
This example will take a reading from the Ultrasonic sensor connected to Port 1, combine it with some text, display on the screen and then continually update the screen with new readings.
There are tool-tip everywhere, so if you're ever not sure what an icon does, just hover your mouse over it, and it'll give you a couple of words outlining its properties.
This is just a very brief teaser and I'll go into far more detail in upcoming posts. If you have any questions or thoughts, please don't hesitate to ask!
I recently ran a Hangout session with a group of girls on the other side of the world. They were having some issues getting their IRSeeker to accurately track an IR Soccer ball and just needed some tips to get them going.
This post sets out 1 possible way of getting a robot to track an IR Soccer ball using the HiTechnic IRSeeker V2 sensor using the NXT-G software. If you haven't already done so, download the custom IRSeeker block and install it in the NXT-G software.
The sensor itself comprises 5 individual detectors, that when used together can tell us if the ball is located in 1 of 9 different locations. From the diagram below we can see that if the IRSeeker gives us a reading of 1, then the ball is all the way to the left. If it gives a reading of 5 the ball is in the middle and a 9 means the ball is all the way to the right. A reading of 0 means that it cannot see a ball at all.
Before we start programming, we need to think about what we want the robot to do for each value we may receive from the IRSeeker. I'm going to keep it very simple for this tutorial, but you can add in more complexity once you have it up and running.
Let's start with some of the easier decisions:
- If I receive a 1, then I want the robot to do a fast, sharp turn to the left
- If I receive a 5, then I want the robot to drive forward as fast as possible
- If I receive a 9, then I want the robot to do a fast, sharp turn to the right
- If I receive a 0, I'll just make the robot stop moving altogether
Some trickier decisions will be 2,3,4 and 6,7,8. For each of these conditions I'll still want to turn, but perhaps not as sharply and perhaps not as fast. I'll leave it up to you to play around and see what works best for your robot.
The key to this program is the Switch Block. Normally the Switch block is tied to a sensor and will give you something like the following
IF Sensor reading is greater than a given amount
Do Action No. 1
Do Action No. 2
This works well if you only have two things to worry about, but in our case we have 10 separate values that will each have a different action associated with it. The first thing we need to do is to set up the Switch to be able to take 10 separate values.
1. Set up the Switch to make decisions based on a 'Value'
That value will be of type 'Number' (not Logic or Text).
2. Uncheck 'Flat View'
Flat View is used to flatten out our two conditions so we can see them both on the screen at the same time. Unchecking this will convert to 'Tabbed' mode where each condition is indicated with a Tab.
3. Add in more conditions
The 'Conditions' column in the configuration panel shows you how many conditions are currently available. Pressing the "+" button will add conditions (and you will see more Tabs added to the Switch Block itself). Let's go for 10 conditions.
4. Check the values that trigger each Condition.
The second column in the Conditions section shows you what value will trigger each condition. The default is that if I receive a '0', I will run condition 1. If I receive a '1', I'll run condition 2 and so on. You can play with these if you want, but I'm going to leave them as is.
5. Start filling in the actions.
By selecting the appropriate Tab, I can then specify exactly what I want my robot to do for each condition. 0=stop, 1=left, 5=straight, 9=right. I'm setting all movements to be 'unlimited' as I want them to keep doing the same thing until the number changes. ie, if I can see a '1', then keep turning, keep turning, keep turning until I see a number that is not 1.
6. Configure the whole switch so that the IRSeeker is the sensor sending it numbers.
Grab your newly installed IRSeerker Block. Use the datahub to wire the 'IRDirection' value to the Switch.
7. Put the whole thing inside a loop
This is done to ensure the programming is constantly going back to the start and checking for new values from the IRSeeker. I've set mine up to loop forever, but perhaps you set yours up on a time (chase the ball for 10 seconds?) or another sensor (chase the ball while the compass sensor is pointing towards goal?)
Other ways of doing it.
Check out these other links (one is mine that I wrote a few years ago and forgot about!). Remember that there are always many ways of solvinf the same problem. See if you can understand all of them.
Just remember that I have only presented a framework for making this work. You'll need to fill in the blanks and also test / tweak to suit your robot. If you manage to get it working, let me know in the comments below!
It's these things that are one of the reasons I love what I do. I recently ran a workshop for grade 4's, squeezing 4 sessions of 26 students, each with only 90 minutes, with as much robotics as possible. It was hectic, high-energy, chaotic at times but a lot of fun. The Teachers commented on how much they and the students loved the day. Fast forward a week and a package arrived for me with a stack of paper from the students. Below are just some of my favourites :)
While the majority of my robotics workshops are held at schools, I on occasions am able to run workshops for Homeschoolers groups. Homeschooling is not as popular here in Australia as it is in the USA, but it is great to see that these groups get together regulalry for the kids to experience things they might not be able to do at home.
This is a lovely writeup of a recent workshop I ran. We did BeeBots with the young ones for about an hour in the morning, and then spent the rest of the day with the older kids building and programming LEGO mindstorms robots.
The Robot Wave activity has always been my favourite and this time it was captured on video
I was sick of my BeeBots rattling around in one of my bags, and the only 'official' storage I could find held only 6 BeeBots. A quick trip to the local foam shop and I got a few pieces custom cut to fit a spare bag of mine. A little Tetris with a template to make sure they fit in, and then careful cutting with a very sharp knife.
This new setup holds 12 BeeBots, 6 mats, spare batteries, BeeBot rulers, pens etc. Everything I need to do a session in class :)
I love it when people take my ideas, and improve on them.
Adriano took the initial designs I had in Making Music with the NXT and improved on them. His design actively pulls up on the lever so that the mallet comes down quickly. More force and you don't have to wait for gravity :)
Can't wait to see what else he comes up with :)
I was very fortunate to help out at the recent Sydney EV3 training. We had the LEGO distributors plus a few top teachers from Australia in a 2-day hands on 'play' session. We were able to give them a good play with both the new Hardware and the new Software coming out.
Rob Widger (Global LEGO Master Trainer) led the sessions and was fantastic, and the excitement on the faces of those who will now go out and show off the capabilities of the EV3 was great to see :)
Geraldine on the Mailing list shared a fantastic simple little activity she did with her students.
Just a very simple idea that is working well for me in my workshops, I am sorry if you have already come up with this idea yourself!!!
I get Y6 children (age 10-11) to attach a bulb to the back of Damien's domabot build and then instruct them to ensure it is lit any time that the robot is reversing. This then leads on, to a road safety discussion and it is surprising that the majority of these children don't realise that cars have reversing lights to warn them that they are about to reverse.
This prompted a bit of a discussion about how such a project could lead on to other subjects. Geraldine didn't share exactly the program she used, but based on her idea, this is what I came up with.
The first line will play a note (G) for 0.5 seconds, then wait for 0.5 seconds. The whole thing is repeated 4 times.
The second line has the robot reversing for 4 seconds at 20 percent power.
The third line uses the Light Sensor block, not to take a measurement, but to toggle the 'Generate Light' function that is used when using the Light Sensor in either Ambient or Reflected mode.
Becasue all three lines run on their own sequence bar, they will be executed in parallel, that is, the robot will reverse, beep and flash the light all at exactly the same time.
I then turn the whole thing into a MyBlock, so I can use it whenever I want. This program will have the robot drive up to an obstacle, run the reversing block, turn a bit and then go driving to find the next obstacle.
If you're interested, I've document the whole process in the video below :) (Make sure you watch in HD)