I am a second year physics teacher, but my school has also asked me to teach a short course on arduino with about 3 - 4 weeks worth of material. I have some basic experience in arduino and have been researching for the past two weeks in order to bring myself up to speed, but I was wondering if I could get some input from those well-versed in arduino programming. What projects would you suggest for high schoolers first learning this concept? What would be some good goals to set my students? I’m not asking anyone to do my work for me as I will continue to learn and research, but I would greatly appreciate any feedback! Thank you!
What age is second year high school ? I searched internet, but it can be anything from 7 to 14 years.
The example with the blinking led is how to start.
Using a servo motor is always fun (output, control something), and there are many sensors (input, measure something).
How to continue depends on how usefull or how much fun or how complex you want it to be.
It can be pure mathematical : let the Arduino run overnight to calculate pi.
It can be fun : ‘touch’ sensors with capacitive library to make sound
It can be useful : make something for disabled people.
It can be complex : display the outdoor temperature online.
I am a second year physics teacher, but my school has also asked me to teach a short course on arduino with about 3 - 4 weeks worth of material. I have some basic experience in arduino and have been researching for the past two weeks in order to bring myself up to speed, but I was wondering if I could get some input from those well-versed in arduino programming. What projects would you suggest for high schoolers first learning this concept? What would be some good goals to set my students? I'm not asking anyone to do my work for me as I will continue to learn and research, but I would greatly appreciate any feedback! Thank you!
School students must be impresed these days to catch their attention. Light and colors are one effective way to do it.
Examples with leds and rgb leds are going to work. If you want to show them a video show youtube examples of using Led strips with Arduino, there are many examples.
Most students will be in the 16-18 years old range. Great advice so far!
The application that we often see is traffic lights. You don't say how much teaching time you have in those 4 weeks, but I suggest just one light running through all the phases* would be do-able in the time available. Before they start programming, get them to write down all the states in order (not forgetting the 'wait' states), so as to get them thinking logically about the problem. After they've completed programming the one light, you could ask them what changes would be needed and how they would implement them (not the code, just the basic method) for a pedestrian push button controlled crossing. Extra points if they remember the walk/don't walk lights and the bleeper for the visually impaired.
I don't think you'd have time for a full cross roads junction (with filter [turn] lights) system, but you could, at least, get your students thinking about the problem.
If you had even more time, I would suggest a lift [elevator] system. With that, you not only have lights (floor indicators and 'lift coming') but also motion. The more floors, the more complex the problem!
How about an after school club for the more interested students?
*See the 'blink without delay' example in the IDE and also look up 'State Machine' and the switch-case construct in the reference pages of this site.
The example with the blinking led is how to start.
Only if it's Blink Without Delay....
See the 'blink without delay' example in the IDE and also look up 'State Machine' and the switch-case construct in the reference pages of this site.
I'm with Henry here.... get the correct habits instilled from the start.
Here's a thought: I read some time ago of a course that tasked its students with making a note of every interaction they had with a sensor or an actuator for a day. If you could get your students to do this before coming to class that will open their eyes. Look at how much we rely on these things. You approach a door: sensor sees you, motor opens the door. You go to ATM: sensor detects your card, motor sucks it in, sensors read your key presses. This will give your students a good feel for what equipment like Arduino are used for in real life.
You could also consider a very simple "robot" car e.g.
You'd need some additional components e.g. the motor drivers and also some sensors, but I think some sort of practical application of programming would always go down better than some abstract (no offense but traffic lights aren't that interesting, even if they are technically challenging to code)
I think it’s important too, that everything you teach (or better, that they learn 8) ) should be part of the overall project goal. By that I mean, don’t fling a load of arbitrary concepts and or techniques at them: here’s why / how we have a pullup, here’s how we read a potentiometer etc etc… all of those should be in the context of what the project is going to do. That’s my opinion of course, and others do it diferently.
You should have a look at Robin2’s tutorial for an end-to-end example. He doesn’t put it in the context of a real-world problem / solution, but gives the idea of how to go about things. Again, it’s his way, not necessarily the best, certainly not the only.
A robot, as suggested by rogerClark is indeed a good idea. It gives the opportunity to show how to plan goals, learn various basic techniques. Also then when the faster students are finished and getting bored you can give them the key to the parts cupboard and let them experiment with more advanced stuff.
I’d also include somewhere along the line, a class on the physical aspects. Some of your students might never have handled a screwdriver, let alone a soldering iron, and it’s important they learn that. Also don’t forget the use of a multu-meter! Maybe even a scope, time and money permitting…
Maybe even mechanical stuff… drilling, cutting… aluminium, plastic, wood… bending, gluing all that stuff. But again, with a purpose… they can make mounting brackets for sensors for example.
Safety… use of ppe, goggles, gloves
You haven't said what your hardware budget is. For example will you have several Arduinos or only one? Will some or all of the kids have their own Arduinos?
If you have only one it might add to the enthusiasm if, towards the end of the course, it was possible for different students to be able to upload their own variants of the code so I would try to think of a project that would facilitate that.
Counter to that at the early stages you must keep all students on the exact same stuff or you will find all of your own time dissipated away. "Hey, Mr - look at this, why won't it work?"
In no particular order ...
Keep it simple.
Start with good programming habits - not spaghetti code.
Keep the theory to a minimum until they get something to happen - the Arduino is all about learning-by-doing.
The students' mistakes will provide the very best teaching/learning opportunities.
Be prepared for some who really will know more than you do.
AS we say in spanish "al bote pronto" (ummm . . . . "some ideas with no deep thinking" )
I would think the first if the course is hardware or software oriented.
If hardware I would make sure that students have a good undertanding on electronic basics; Ohm's law; AC vs. DC circuits; diodes; transistor running ON-OFF. Then I would show how to substitute manual switches (to make things lite and so on) by arduino. You can introduce them to programming and (I regret not agreeing to some well respected forers) I wouldnt worry so much about rigorous programming (nevertheless, you have to insist them that it is not -rigorous, I mean).
If software, "peripheral" hardware has to be ready to work (resistors in series with LED's calculated and circuit wired, etcetera) and you have to explain it in a divulgative fashion (the hardware you are going to use, including the way I/O arduino pins work). Then, depending on the programming (previous) knowledge, an approach to "arduino C" (C is not an easy language; I regret not agreeing to some well respected forers) or a more rigorous course maybe desirable.
If both, (2) + (3).
I assume that you will need to teach at least some of your students to program in C/C++ and some may not have coded at all, so you'll need to allocate time to teach, or at least debug their copy & paste efforts. Some really simple projects may help here to get something working without having to master the nitty gritty of all that is C.
Perhaps a chicken coop example - an LDR to decide night or day and a servo to open/close a (very light) door. Easy to introduce hysteresis here too.
Especially for your first iteration of the class, I'd want the projects to be a bit open ended. The traffic light example above is great for this as more & more complexity can be added. I like a greenhouse controller project for the same reason and indeed the chicken coop can be made more sophisticated too.
More load on the teacher, but it might make things more interesting if you have teams of students work different projects in the second half of the course.
We still haven't heard from the OP about how much time and equipment is involved. Four weeks could be anything from 1 hour a week for 4 weeks to 4 weeks * 5 days * 6 hours. The former wouldn't give time for anything but the simplest of projects, but until he gives us more details, we're just guessing how complex it can be.