Shop OBEX P1 Docs P2 Docs Learn Events
Three days of programming robots with middle school students: give them a welcome! — Parallax Forums

Three days of programming robots with middle school students: give them a welcome!

Ken GraceyKen Gracey Posts: 7,392
edited 2014-06-14 19:37 in General Discussion
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


Robo1.jpg
Robo5.jpg

Robo2.jpg
Robo3.jpg
Robo4.jpg
1024 x 683 - 95K
1024 x 1536 - 109K
1024 x 683 - 99K
1024 x 683 - 42K
1024 x 1536 - 132K

Comments

  • PublisonPublison Posts: 12,366
    edited 2014-06-02 16:34
    Ken,

    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
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-06-02 16:43
    Welcome to Boe-Botics :-)

    Seriously, y'all will have a blast with robots!
  • jazzedjazzed Posts: 11,803
    edited 2014-06-02 17:26
    Great looking classroom and crew.

    Big welcome to all of you.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-06-02 19:51
    Looks like a lot of fun!
  • WildatheartWildatheart Posts: 195
    edited 2014-06-02 22:35
    The good looking guy wearing the Port Townsend, Wa. sweat shirt... Ken, you didn't mention that Phil Pilgrim was helping you teach the class.

    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.
  • idbruceidbruce Posts: 6,197
    edited 2014-06-03 07:52
    Welcome to the world of all things Parallax :)
    These students finally get to put their math to practice.

    Perhaps you youngsters might share some of your math skills with Ken.
    I'm spending the next three days working in a local middle school with 14 students.

    I only count 10 students :)
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-06-03 11:06
    Welcome! The BASIC Stamp and PBASIC still rocks as an introduction to programming and electronics. DEBUG "Hello". And there it is. HIGH 1. And the light is on. Concentrate on the circuit and developing the program logic.

    I still have one of those 2001 BASIC Stamp T-shirts: "Finally, a computer that takes orders FROM YOU."
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-06-03 12:09
    For my students, this is the code you wrote to blend the whiskers with light following - Ken
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2014-06-03 16:58
    Welcome guys!


    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
    return
    
  • ercoerco Posts: 20,256
    edited 2014-06-03 17:36
    Welcome students! You are lucky to be in very capable and friendly hands. I can't imagine a better introduction to robots & programming than what Ken is giving to you. Enjoy your time with him, and come back to this forum with any questions and to share your accomplishments. It's a great and friendly group of people here, you'll feel welcome in no time. When you first post here, please identify yourself as one of Ken's students. We have high expectations of you guys! :)
  • WhitWhit Posts: 4,191
    edited 2014-06-03 19:34
    Welcome to robotics! You all have a great teacher and are learning on a great robot. Most of the robot builders on this forum started with a BoeBot.

    Have 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!
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-06-04 10:35
    Hey kids,

    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
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-06-04 11:49
    These guys got the oval race figured out. They're finally getting to the real issues of how to get the best time:

    - 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

    CompetitionHeatsUp.jpg
    480 x 640 - 128K
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-06-04 11:56
    And the break time included some egg/golf ball drops from a 3D printed bomb bay on an ELEV-8.

    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

    BombBay.jpg
    480 x 640 - 160K
  • ercoerco Posts: 20,256
    edited 2014-06-04 16:33
    Most excellent! Martin_H did that PING)) wall-following gig for my "Oval Office Challenge". http://forums.parallax.com/showthread.php/139717-Erco-s-Oval-Office-Challenge?p=1094588&viewfull=1#post1094588
  • GenetixGenetix Posts: 1,754
    edited 2014-06-04 19:25
    I've always found it helpful to put any circuit schematics near the top of the program and make as many numbers as possible constants so they can easily be changed.
    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.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-06-04 20:53
    Welcome, middle schoolers, to the wonderful world of robotics!

    '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
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-06-13 16:55
    I posted a little roundup of my class right here https://www.parallax.com/news/2014-06-13/pbasic-ideal-first-language-education

    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
  • David BetzDavid Betz Posts: 14,516
    edited 2014-06-13 20:16
    Ken Gracey wrote: »
    I posted a little roundup of my class right here https://www.parallax.com/news/2014-06-13/pbasic-ideal-first-language-education

    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
    If PBASIC is such a good choice for teaching kids about programming then why hasn't Parallax ever made a version of BASIC available for the Propeller?
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-06-13 20:49
    David Betz wrote: »
    If PBASIC is such a good choice for teaching kids about programming then why hasn't Parallax ever made a version of BASIC available for the Propeller?

    Limited resources and people were screaming for C.

    It'd be great to see PropBASIC become that tool. What's PropBASIC missing?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2014-06-13 22:00
    PropBASIC would be an excellent tool if developed a bit more. It has a lot of horsepower, but is missing a few things from typical BASIC, strings for example.
    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
  • David BetzDavid Betz Posts: 14,516
    edited 2014-06-14 19:24
    Ken Gracey wrote: »
    Limited resources and people were screaming for C.

    It'd be great to see PropBASIC become that tool. What's PropBASIC missing?
    I haven't used it myself but my impression is that it's mostly missing a good IDE. Maybe official support for it in SimpleIDE would help it be used more.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-06-14 19:32
    PropBASIC would be an excellent tool if developed a bit more. It has a lot of horsepower, but is missing a few things from typical BASIC, strings for example.
    As far as I know, PBASIC doesn't support strings and based on Ken's post it seems quite useful for teaching programming. Are strings really necessary for a microcontroller language? C-like strings could probably be added to PropBASIC fairly easily. That's essentially what Spin has and it seems adequate. Dynamic strings may not really be required for PropBASIC to be as useful as PBASIC already is.
  • ercoerco Posts: 20,256
    edited 2014-06-14 19:37
    Ken Gracey wrote: »
    When dropped from 500' the golf balls bounced about 100' high. This really surprised me!

    Surprisingly elastic. Who knew!
Sign In or Register to comment.