Three days of programming robots with middle school students: give them a welcome!
Ken Gracey
Posts: 7,419
Hey there,
I'm spending the next three days working in a local middle school with 14 students. We've dedicated the last three days of the school year to an extended robotics course. These students finally get to put their math to practice. I chose PBASIC over C for this audience and I find it far more appropriate. I believe they should see all of our languages in due course, however, and the benefits that each of them offer.
I'm really working closely with these students to see what we can convey over three days. On the first day they had a good understanding of controlling LEDs, servos and some basic electronics. I find BASIC to be an ideal first language. There's enough going on with power supply, circuit building, and following instructions at this grade level. It's a balancing match between satisfaction and work, too - you have to dish out these two pieces at the right rate, erring on the satisfaction angle. But you'd still have to try to lose their interest and that's hard to do with robotics.
I'm surprised at how these kids are progressing. Having worked with many students over the past five years, I can see their rate of uptake is increasing over prior years. Two of them are building quadcopters and have flown them FPV - but that experience has been too "high level" and they missed the appreciation of how the work, how to build them, and the responsibility over the craft. I've got a job of backfilling that kind of experience over the next few years.
I'll report back in detail on the Parallax Insider News when we're all done.
In the meantime, I'll post a lot of photos here so maybe you could give them a shout out and welcome!
Ken Gracey




I'm spending the next three days working in a local middle school with 14 students. We've dedicated the last three days of the school year to an extended robotics course. These students finally get to put their math to practice. I chose PBASIC over C for this audience and I find it far more appropriate. I believe they should see all of our languages in due course, however, and the benefits that each of them offer.
I'm really working closely with these students to see what we can convey over three days. On the first day they had a good understanding of controlling LEDs, servos and some basic electronics. I find BASIC to be an ideal first language. There's enough going on with power supply, circuit building, and following instructions at this grade level. It's a balancing match between satisfaction and work, too - you have to dish out these two pieces at the right rate, erring on the satisfaction angle. But you'd still have to try to lose their interest and that's hard to do with robotics.
I'm surprised at how these kids are progressing. Having worked with many students over the past five years, I can see their rate of uptake is increasing over prior years. Two of them are building quadcopters and have flown them FPV - but that experience has been too "high level" and they missed the appreciation of how the work, how to build them, and the responsibility over the craft. I've got a job of backfilling that kind of experience over the next few years.
I'll report back in detail on the Parallax Insider News when we're all done.
In the meantime, I'll post a lot of photos here so maybe you could give them a shout out and welcome!
Ken Gracey






Comments
Nice way to spread the good word of Parallax.
I see a lot of smiles on those faces. You must be doing something right!
Hope to see you guys on the forum soon.
Jim
Seriously, y'all will have a blast with robots!
Big welcome to all of you.
If there's a slim chance this isn't PhilPi, I'm sure we'll end up with two great engineers from Port Townsend if he gets a chance to meet PhilPi during his next visit there.
Don't forget to tell the guys to log into the forums so we can meet them too.
Perhaps you youngsters might share some of your math skills with Ken.
I only count 10 students
I still have one of those 2001 BASIC Stamp T-shirts: "Finally, a computer that takes orders FROM YOU."
How about some robot sounds to go with those bots?
'{$STAMP BS2} i var word j var word spkr var nib spkr=2 ' speaker pin output spkr ' --- test ---- (change at your own convenience ) gosub sound_18 gosub sound_1 gosub sound_18 pause 500 gosub sound_2 gosub sound_3 gosub sound_6 pause 500 gosub sound_1 gosub sound_4 gosub sound_0 pause 500 gosub sound_16 gosub sound_17 gosub sound_15 pause 500 gosub sound_18 gosub sound_13 gosub sound_18 gosub sound_3 gosub sound_18 gosub sound_7 gosub sound_8 stop '--- end of test -------------------------- ' --- noises ------- sound_0: for j = 1 to 4 for i=2000 to 50 step 400 freqout spkr,10,i next for i=800 to 2000 step 400 freqout spkr,10,i next next return sound_1: for i = 800 TO 2000 STEP 100 freqout spkr,10,i next for i= 2000 TO 50 step 100 freqout spkr,10,i next return sound_2: for i = 1000 to 40 step 20 freqout spkr,10,i next return sound_3: for i = 10000 to 500 step 500 freqout spkr,10,i next return sound_4: for i = 10 to 50 step 10 for j = 50 TO 10 step 10 freqout spkr,15,j*20 next next return sound_5: for i = 1 TO 120 step 2 freqout spkr,10,(sin(i + 40) * 50) next return sound_6: for i = 10 TO 50 step 10 for j = 50 to 10 step 10 freqout spkr,10,i * J next next return sound_7: for i = 30 to 70 step 5 for j = 70 to 30 step 5 freqout spkr,10,i*j next next return sound_8: for i= 30 to 60 step 10 for j = 60 to 30 step 10 freqout spkr,10,i * j next next return sound_9: for i = 1 to 60 step 7 freqout spkr,10,(sin(i) + 20) * 30 next return sound_10: for i = 1 to 30 freqout spkr,20,(i * 14) + 450 next return sound_11: for i = 10000 to 500 step 500 freqout spkr,20,i next return sound_12: for i = 102 to 82 step 2 freqout spkr,40,(COS(i/100) + 36) * 25 freqout spkr,20,(SIN(i/100) + 20) * 50 next return sound_13: for i = 1 to 10 freqout spkr,40,1195 freqout spkr,40,2571 next return sound_14: for i= 1 to 3 freqout spkr,90, 550 freqout spkr,90, 400 next return sound_15: for i = 40 TO 15 step 1 freqout spkr,5,I * 90 freqout spkr,5,I * 80 freqout spkr,5,I * 70 freqout spkr,5,I * 60 freqout spkr,5,I * 50 next return sound_16: for i = 1 to 20 freqout spkr,20,1195 - 50 * I freqout spkr,20,1195 + 50 * I next return sound_17: for i = 0 to 150 step 10 freqout spkr,20,1295 - I freqout spkr,20,1095 + I next return sound_18: for i = 1 to 20 freqout spkr,10,I * 50 freqout spkr,10,I * 100 freqout spkr,10,I * 150 next returnHave fun and welcome to the forums! Come back and ask lots of questions. You'll find lots of friendly folks here to help keep you going....
Keep the photos coming Ken!
Here's the example PBASIC code we wrote for the oval velodrome race. Remember what I told you about the possible modifications, as I'm not handing out any more tips.
Ken Gracey
- sensor placement
- number of servo loops
- servo speed
- using inches vs. centimeters as measurement base
- adding more granularity to the control system
- commenting out lines of code (DEBUGs)
They're struggling with some jerky movement, some of which is a function of single-threaded BS2s, slower servos and checking the Ping))). Some of this we can address in discussion, other bits have more useful explanation with more experience.
Great contest, Phil!
Ken Gracey
When dropped from 500' the golf balls bounced about 100' high. This really surprised me!
And the eggs, well, they nearly disappeared on impact.
Ken Gracey
It's more work but very helpful later when you come back to this program or need to modify it.
I also had one instructor who was hard-core about commenting EVERY line of code.
'Loved the P.T. hoodie on your son, Ken! I'm sure he'll outgrow it soon, so it'll be time to come up for another visit and more P.T. souvenirs.
'Just taught my last class of the school year today. It was ActivityBot, plus XBee, plus rubber-band-gun mayhem! Gad, I'm going to miss it! (I guess now I can concentrate all of my energy on that "other project.")
-Phil
My takeaway thought is that I was very thankful to have PBASIC to share with these kids. At this age, my effort will almost always go towards PBASIC.
Ken Gracey
Limited resources and people were screaming for C.
It'd be great to see PropBASIC become that tool. What's PropBASIC missing?
It's primary weakness right now is that it is joined at the hip to BST, which is a abandoned project. Some attention and some object support would bring it up to speed.
Glad to see that the concepts SIMPLE and EASY haven't been abandoned for higher languages like C or Python.
My venture into that PIC Micromite has shown me that there is NO REASON why I should have to fiddle with pages of code to talk to a sensor when an accessable single line of code will do the job. Let the complication be buried under the hood! I want to race! I've heard these words echoed from others.
By all means! Pour some love into PropBASIC.
Jeff
Surprisingly elastic. Who knew!