Jessica Uelmen

S2 Robot Messenger 'Bots!

Rate this Entry
Faster than the Pony Express, slower than email, but still super fun!

Learn how to get your S2 Robot to follow a line, which can be used to make your very own messenger robot. Or in my case, a Tech Support M&M Retriever!


I hope that someone gets your "message in a robot!" :]

Oh, and Happy National Robotics Week!
Attached Thumbnails Attached Files

Submit "S2 Robot Messenger 'Bots!" to Digg Submit "S2 Robot Messenger 'Bots!" to del.icio.us Submit "S2 Robot Messenger 'Bots!" to StumbleUpon Submit "S2 Robot Messenger 'Bots!" to Google

Updated 04-15-2011 at 05:56 PM by Jessica Uelmen

Categories
Uncategorized

Comments

  1. Bill Henning's Avatar
    Nice video blog entry!

    One suggestion - move the pivoting code so that it only executes if both flag tests fail

    Regards,

    Bill
  2. Jessica Uelmen's Avatar
    Ahhh yes! Good catch - this is what I get for rushing things.

    Updated!
  3. davejames's Avatar
    Ma'am,

    I shared this blog entry with a co-worker and she believes you're using Camtasia for screen and motion capture. Is this correct?

    What do you use for the video capture and editing?
  4. Jessica Uelmen's Avatar
    Yep, Camtasia is correct! I highly recommend it. It allows me to edit my screen captures before importing into Sony Vegas, where I do the actual video editing.
  5. Whit's Avatar
    You are the best. Another winner! Hope you had a great National Robotics Week celebration.
  6. Whit's Avatar
    Nice S2 work stand (by the way)! I love the party glass idea too!
  7. localroger's Avatar
    This is a really nifty and fun video! Jessica, your enthusiasm shines through.

    At the risk of sounding like a wet blanket, though, I have to say I am baffled by the very idea of the GUI programming interface for the S2. I suppose I see the advantage for very young children or people who are afraid of computers, but with all those icons that don't directly port to any other environment, I see a young person developing a bit of expertise here that doesn't readily translate to real programming skill. Is it really so demanding to ask someone to learn something like PBASIC?

    Of course, as a literate person in my late 40's I see the icons as more of a hindrance than a help, kind of like the ones on the dashboard of my car (I had to stop on the side of the road and look it up in the user's manual when the TPMS light came on. Tire pressure? Really? I thought that icon might mean something like "Godzilla is about to crush you." Is it really that hard to have the light say "Tire Pressure" in English?) There is no standardization of icons, and there is a sharp limit to the complexity of a program you can create this way, but there is a lot of similarity between ASCII sourced computer languages; the concept of "if {condition} then {do something}" isn't much different in C than it is in Spin or BASIC, once you take account of END IF versus curly brackets versus indenting.

    Anyway, this isn't a criticism of you or your work, Jessica; it's more of a vent on a side issue that bugs me. I do enjoy your videos and I like the work you're doing. Please do more, even if it's with the weird graphical programming interface :-)
  8. Whit's Avatar
    @localrodger - you say, "all those icons that don't directly port to any other environment." I don't know if you have a Scribbler or an S2 - but the way it works is amazing. The S2 GUI generates Spin code that can be accessed from the GUI. For example, Jessica's GUI Messenger Program generated this code (which works along with the S2 Object.

    Code:
    '---[Main Program: Green]------------------------------------------------------
    PUB Green
      repeat
        ReadLine
        if (LeftLine == 0 and RightLine == 1)
          MotorSet(0, 230, 0)
          s2.set_leds(s2#GREEN, s2#OFF, s2#OFF, s2#NO_CHANGE)
          Flag_green := true
        elseif (LeftLine == 1 and RightLine == 0)
          MotorSet(230, 0, 0)
          s2.set_leds(s2#OFF, s2#OFF, s2#GREEN, s2#NO_CHANGE)
          Flag_yellow := true
        elseif (LeftLine == 0 and RightLine == 0)
          MotorSet(115, 115, 0)
          s2.set_leds(s2#GREEN, s2#OFF, s2#GREEN, s2#NO_CHANGE)
        else
          if (Flag_green)
            MotorSet(230, 0, 0)
            Flag_green := false
          elseif (Flag_yellow)
            MotorSet(0, 230, 0)
            Flag_yellow := false
          else
            s2.set_leds(s2#OFF, s2#OFF, s2#OFF, s2#NO_CHANGE)
            MotorSet(-115, 115, 0)
     
    '---[Set Motor Speeds]---------------------------------------------------------
    PRI MotorSet(lmotor, rmotor, timer)
      MoveTime := timer #> 0
      LeftMotor := lmotor #> -256 <# 256
      RightMotor := rmotor #> -256 <# 256
      if (LeftMotor <> pLeftMotor or RightMotor <> pRightMotor or MoveTime <> pMoveTime or pMoveTime <> 0)
        if (MoveTime)
          s2.move_now(LeftMotor * MoveTime * FullCircle / 1_024_000, RightMotor * MoveTime * FullCircle / 1_024_000, MoveTime << 1, (||LeftMotor #> ||RightMotor <# 255) >> 4, 0)
          s2.wait_stop
        else  
          s2.wheels_now(LeftMotor, RightMotor, 0)
          waitcnt(cnt + clkfreq / 10)
        pLeftMotor := LeftMotor
        pRightMotor := RightMotor
        pMoveTime := MoveTime
     
    '---[Read the Line Sensors]----------------------------------------------------
    PRI ReadLine
      LeftLine := 1 + s2.line_sensor(s2#LEFT, LineThld)
      RightLine := 1 + s2.line_sensor(s2#RIGHT, LineThld)
    '---[End of Program]-----------------------------------------------------------
    Using the GUI to generate Spin that is easily accessed is a great way for new programmers to learn. I think is fairly easy to see how the Spin above relates to Jessica's GUI program. The old Scribbler did the same thing with PBASIC - and it was a great learning tool. The S2 does so with Spin. In addition, the S2 Object and helps found in the GUI are great resources for those learning Spin.

    See my post here http://forums.parallax.com/showthrea...-Spin-Lesson-1
    I am trying to develop some simple examples to show GUI users how to move to Spin. The GUI is a great help in doing this.

    Download the S2 GUI Program Maker and play with it a bit. I'm sure you will be impressed. Phil Pilgrim did an amazing job on this.
  9. localroger's Avatar
    Whit,

    I appreciate your point. But I would counter that people like myself learned programming on 8 bit systems that not only didn't have a nifty GUI, you ran out of RAM at the second left turn. Skill is forged in a cauldron of impossibility crossed with desire. Making it convenient doesn't make makers. Giving us the ability to make things makes us makers. I'm about to write a script to convert another output to something that looks like inkscape for Ponoko. You don't even consider **** like that unless you are seriously deep into a way of thinking that is not, if you give it any thought at all, normal.
  10. localroger's Avatar
    Oh darn, I used a bad word. Props to Parallax for ******ing int instead of nuking it.
  11. Ravenkallen's Avatar
    @Localroger.... I kinda understand your frustration about the GUI programming method. Especially when it comes to "flowcharts" which are basically just pictures with a couple of word inside. It doesn't take that much extra brain power to manually enter code... I see GUI's as kind of a crutch(Sort of like some people think BASIC is a crutch). What if all that excess was taken away? How many hackers could really be able to program in Assembly or build a small system out of logic gates?... BUT for kids and raw newbies, i can see the usefulness of GUI's. They have the potential to simplify things considerably. Plus, everything has a GUI on it today. If you have a computer system that can handle really intense graphics, why not try to make things be easy...er. That is what the whole Arduino crowd is about these days. Trying to spoon feed the masses, so they can gloat over their not-so-spectacular achievements. BUT, would i want to program in assembly if i could program in SPIN/ C++? NOPE! Would i rather use a flowchart than physically re-wire a circuit? Yep!...I see the good and the bad. I think a individual who really wants to immerse himself in his field will go to lengths to understand everything about it.... I guess laziness really is the mother of invention

    @Jessica.... Another cool video. Sting is probably jealous of your singing skills
    Updated 04-18-2011 at 05:29 AM by Ravenkallen
  12. Whit's Avatar
    localroger,

    You said, "Skill is forged in a cauldron of impossibility crossed with desire."

    Nothing to disagree with there!
  13. Jessica Uelmen's Avatar
    Oh my, it seems that I've sparked quite the debate! ;]

    As an official "Parallax" POV, both Whit and Ravenkallen are correct. The GUI is simple and great for kids who may not be so comfortable with a keyboard yet. And as Whit pointed out, once they've "outgrown" the GUI, they have a means to switch over to Spin. Phil really did an amazing job with the s2.spin object.

    And localroger, you're right, the icons can seem abstract and don't port easily to another environment. However, they do a good job of laying the foundation for programming concepts: if-then-else structures, sequential programming, comparisons, etc. And in this day and age of budget cuts and teacher layoffs, many teachers with very diverse backgrounds suddenly find themselves teaching the robotics class or club. We've had Math, Biology, Psychology and even English teachers in our Educator's Courses in the past. These poor teachers are already under enough stress and strain, and for them a GUI environment is much more friendly and manageable.

    Does this mean that we'll only be making tutorials and videos using the GUI? Of course not! But it is important to support it first for those customers that like it for the reasons mentioned above. If we can entice them with a friendly graphical environment, and then get them comfortable enough to grow from there, then that's just awesome.

    Now for some personal comments...

    @Whit - Yes, the test stand is very awesome, thanks again for sending them!
    @localroger - Thanks for your compliments, and bringing up some good points! Hopefully my comments made a bit of sense...
    @Ravenkallen - Well, I don't think I'll be winning any American Idol competitions in the near future, but thanks!