Searching \ for '[OT] A programming language for robots' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devprogs.htm?key=programming
Search entire site for: 'A programming language for robots'.

Exact match. Not showing close matches.
PICList Thread
'[OT] A programming language for robots'
2005\07\16@222444 by Matthew Miller

flavicon
face
Hi everyone,

I'm looking for some advice. For the past two summers I've taught an
electronics/robotics class to high schools students (9th-11th graders) and
the robots we use are programmed in C. Both times teaching this class I've
been dissappointed with how well the students grasped the programming aspect
of the course.

While my teaching may be at fault, I think the larger problem is that C is a
poor language for beginners. Six weeks is also a short period for such an
introduction to programming... What I would like to do is use a different
programming language. Currently, I'm looking very strongly at Logo. The main
reason that Logo is appealing is because of the basic graphics programming
that it uses. For example, I could show the kids a program that draws a
square on the computer screen, and then show that the same program on the
robot traces out a square as it moves. The "turtle" metaphor could be very
useful.

So, I'm looking for suggestions and comments. I would like to continue using
the "Rug Warrior Pro" robots, but I have no information on the interpreter
software that is used (I guess I could translate another language to C.)
Building a simple (PIC based of course) robot would be fun though.

Thanks for any insights (especially WRT teaching kids how to program!)

Matthew

--
"I prefer the wicked rather than the foolish.
The wicked sometimes rest."   -Alexandre Dumas

2005\07\17@015551 by Gerhard Fiedler

picon face
Matthew Miller wrote:

> While my teaching may be at fault, I think the larger problem is that C is a
> poor language for beginners.

I agree. C is not meant for instant gratification :)  When teaching kids
programming it is important that you have something that works somehow
every day.

> Currently, I'm looking very strongly at Logo.

Good choice, IMO. Forth is also interesting and structurally similar (even
though a bit more complex), and you may easier find an interpreter. Usually
beginners do well with Basic, too -- and there are quite a few options out
there. I don't know your system, though.

Gerhard

2005\07\17@030342 by David P Harris

picon face
Matthew Miller wrote:

{Quote hidden}

You might be interested in Smalltalk, specifically Squeak.  Smalltalk is
designed for teaching programming.  See: http://www.squeak.org/

There is a brand-new good book on Squeak and robots:
http://smallwiki.unibe.ch/botsinc/ "*Squeak: Learn Programming with
Robots"*.  And here is a package for controlling Lego Mindstorm robots:
http://www.eg.bucknell.edu/~lego/*

*Good luck,
David
*
*

2005\07\17@041112 by D. Jay Newman

flavicon
face
> >While my teaching may be at fault, I think the larger problem is that C is a
> >poor language for beginners. Six weeks is also a short period for such an

Yes. Teaching both robotics and C in 6 weeks is a difficult task.

I suggest that you contact the person who is selling the uVM (Muvium)
chips (PICs running *compiled* Java).

http://www.muvium.com/

He is working on a graphical language that compiles to Java, which is
then compiled so it runs on the uVM PIC.

Unfortunataly I haven't had the time to keep up with his developments,
so I don't know where he is.

I have a similar idea, and have written a framework for robotics in Java,
though I'm running mine on a Linux motherboard. I'm thinking that someday,
after I finish my book and get somewhat through my to do list of projects
that I will write a graphical editor that allows my framework to be
used/extended by manipulating icons.

> >programming language. Currently, I'm looking very strongly at Logo. The main
> >reason that Logo is appealing is because of the basic graphics programming

> >So, I'm looking for suggestions and comments. I would like to continue using
> >the "Rug Warrior Pro" robots, but I have no information on the interpreter
> >software that is used (I guess I could translate another language to C.)
> >Building a simple (PIC based of course) robot would be fun though.

I'm not familiar with these robots. I'd be interested in a quick opinion
about why you think they are good for teaching, if you have the time.

> There is a brand-new good book on Squeak and robots:
> http://smallwiki.unibe.ch/botsinc/ "*Squeak: Learn Programming with
> Robots"*.

This looks interesting! I'll have to order the book.
--
D. Jay Newman           ! Polititions and civilations come and
spam_OUTjayTakeThisOuTspamsprucegrove.com     ! go but the engineers and machinists
http://enerd.ws/robots/ ! make progress

2005\07\17@083915 by Philip Pemberton

face picon face
In message <.....20050717022439.GD16035KILLspamspam@spam@naxs.net>
         Matthew Miller <namiller2spamKILLspamnaxs.net> wrote:

> So, I'm looking for suggestions and comments.

Pascal is quite easy to learn - take this for instance:

function foo(bar : Byte) : Byte;
var
 xyz : Byte;
begin
 xyz := 2;

 return (bar * xyz) xor $5A;
end;

And the corresponding C equivalent:

unsigned char foo(unsigned char bar)
{
 unsigned char xyz;

 xyz = 2;
 return (bar * xyz) ^ 0x5A;
}

I tend to use C more than Pascal, but Pascal is still a very capable (and
simple) language. It's far easier to write a quick-n-simple Pascal
interpreter/compiler than it is to do the same thing with C. You could also
do Pascal-to-C translation if you had to - I think there's a program called
"p2c" that does it.

Later.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
.....philpemKILLspamspam.....philpem.me.uk              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.me.uk/          | 48xCD, ARCINv6c IDE, SCSI
... 10 PRINT "Waiter, There's a bug in my LOOP": GOTO 10

2005\07\17@111553 by Matthew Miller

flavicon
face
Hi Phil,

On Sun, Jul 17, 2005 at 01:36:05PM +0100, Philip Pemberton wrote:
> In message <EraseME20050717022439.GD16035spam_OUTspamTakeThisOuTnaxs.net>
>           Matthew Miller <namiller2spamspam_OUTnaxs.net> wrote:
>
> > So, I'm looking for suggestions and comments.
>
> Pascal is quite easy to learn - take this for instance:
>
> I tend to use C more than Pascal, but Pascal is still a very capable (and
> simple) language. It's far easier to write a quick-n-simple Pascal
> interpreter/compiler than it is to do the same thing with C. You could also
> do Pascal-to-C translation if you had to - I think there's a program called
> "p2c" that does it.

Using p2c is a good suggestion. It would allow me to use the existing robots
and software with the addition of only a translation step. I'll consider
pascal, but I'm concerned that it's not much more simple than C from the
perspective of a new student.

Thanks.

Matthew

--
"Beer is living proof that God loves us and wants us to be happy."
 --  Benjamin Franklin

2005\07\17@113843 by Byron A Jeff

face picon face
On Sun, Jul 17, 2005 at 11:15:49AM -0400, Matthew Miller wrote:
{Quote hidden}

Agreed.

I have a suggestion. You have an specific application. You really need an
application specific language. C and Pascal are good when you have a variety
of problem domains that you want to write software for. General purpose
languages add a lot of necessary complexity in order to be general purpose.

Your LOGO thought is the right idea. When I used to teach the intro to
programming class in C, I had students that struggled with the abstract
concepts that I was trying to get across. So one semester I wrote a
simulation scripting language, called MILO,  that controlled a virtual monkey
with commands (left, right, up, down, pickup, drop, eat, etc.) and the
programming projects were to write scripts that controlled the monkey. Groups
of students who were shown the simulation language did better when shown the
abstract concepts of selection and repetition.

My NPCI language takes a minimalist approach to program development. It's
block structured, only has one simple construct per abstract concept, and
sprinkles in a bit of microcontroller specific stuff like direct bit
manipulation. I have a preliminary language overview here:

http://www.finitesite.com/d3jsys/README-NPCI.html

NPCI doesn't have polish yet though. But I'm getting ready to put it out
there for public consumption. So if you're interested let me know.

I can also dig up MILO too. I have it on a machine somewhere. Requires curses
to do its job. So with the minGW compiler and the pdcurses DLL, it should be
possible to get it running on a Windows box in short order.

Good luck,

BAJ

2005\07\17@120148 by Dave VanHorn

flavicon
face

>
>I have a suggestion. You have an specific application. You really need an
>application specific language. C and Pascal are good when you have a variety
>of problem domains that you want to write software for. General purpose
>languages add a lot of necessary complexity in order to be general purpose.

In the AVR, and in the PIC, I've written bytecode interpreters.
These let you define only the commands you need, and the language can
be as simple as you like.

In the PIC, it was for a software controlled transmitter, I
implemented 16 commands, with "skip" on conditionals like "Skip -3 if
input active"

The first implementation I ever worked on, was for the Verifone
transaction terminals, which we called "TCL".
Over time, it grew quite complicated, but everything was task oriented.
The first TCL program written for a customer was "MNL"
  M ;read the Magstripe
  N ; priNt it
  L ; Loop back and do it again.

A lot of code in those commands, but to the TCL programmer, very simple.
Verifone has the manual on their web site, might give you some ideas.


2005\07\17@120618 by Matthew Miller

flavicon
face
Hi Jay,

On Sun, Jul 17, 2005 at 04:06:28AM -0400, D. Jay Newman wrote:
>
> I'm not familiar with these robots. I'd be interested in a quick opinion
> about why you think they are good for teaching, if you have the time.

The robots have a lot of good qualities (ignoring the programming language
used). They have sensors for light intensity (two CdS cells), proximity (two
IR xmit/receive pairs), sound, and beneath the plastic dome three collision
detection switches. As far as output goes, in addition to the robots
movement, there is a two line LCD display and a piezo buzzer, whose pitch
and duration can be changed to play simple tunes.

A serial link is used to transfer the program to the robot and the host
software is easy to use. One thing I don't care much for is that the users
program is stored in RAM. So, that when the robot is turned off the program
is lost; this isn't too bad in an educational setting, but it is undesirable
as a whole. And sadly the robot is controlled by a Motorola HC11 uC and not
a PIC. ;^)

The LCD display makes this robot very student friendly, we used it for
debugging more than anything else. I think it's a very capable robot system,
I just loath teaching C. I'm a proficient C programmer, but in my situation
and setting C is an awful choice of language to use.

Everyone, thanks for you input and suggestions. I'm glad that I have ten
more months to sort this out!

Matthew

--
Science is facts; just as houses are made of stones, so is science made
of facts; but a pile of stones is not a house and a collection of facts
is not necessarily science.
               -- Henri Poincaire

2005\07\17@132735 by Matthew Miller

flavicon
face
Hi Byron,

On Sun, Jul 17, 2005 at 11:38:42AM -0400, Byron A Jeff wrote:
>
> I have a suggestion. You have an specific application. You really need an
> application specific language. C and Pascal are good when you have a variety
> of problem domains that you want to write software for. General purpose
> languages add a lot of necessary complexity in order to be general purpose.

I think you're absolutely right with this suggestion!

> I can also dig up MILO too. I have it on a machine somewhere. Requires curses
> to do its job. So with the minGW compiler and the pdcurses DLL, it should be
> possible to get it running on a Windows box in short order.

At your convenience could you find the MILO source? From your description,
I'm very interesting in trying it out. In addition to using a new language
for these robots, I'm also concerned about how to teach programming. I think
I've been using teaching methods that are too abstract, math concepts don't
make good programming examples in my experience (I'm still amazed that none
of the 10th-11th graders in my groups knew what a piece-wise function was, I
know I learned about them in high school...)

Thanks for your input.

Matthew

--
"Ptolemy invented a universe and it lasted two thousand years. Newton
invented a universe and it lasted two hundred years. Now Dr. Einstein has
invented a new universe and no one knows how long this one is going to
last."   -- George Bernard Shaw (1930)

2005\07\17@150543 by Gus Salavatore Calabrese

face picon face
Sorry for jumping in at this point and maybe
rehashing what has already been covered.

Possibly some version of the Forth language would
work for you.  I believe you can find Forth that is
running on PIC chips.

Forth will allow you to teach basic programing concepts.
It is certainly different than C, or scripting languages
although it is possible to modify Forth's behaviour to
be more script.like.

Forth operates with nested words and allows immediate
execution of a word ( as well using words in a programmed
process ).  For example, some words might be CCW, CW,
FORWARD, BACKUP,BEEP

180 CCW (cr) would have the robot turn 180 degrees CounterClockwise  
immediately.
20 CW (cr) would have the robot spin clockwise 20 degrees immediately.
Don't like CCW as a command ?  Redefine it as LEFT.
16 FORWARD 180 CCW 19 BACKUP (cr) would have the robot
go forward 16 inches, do a 180, and backup 19 inches.
: BLOOP 16 FORWARD 180 CCW 19 BACKUP ; (cr) would create a new
word called BLOOP.
BLOOP (cr) would then have the robot
go forward 16 inches, do a 180, and backup 19 inches.

Simple once some one demonstrates.   You can show the
same process on a PC with sprites.


There are many free flavors of Forth and it runs on nearly
every processor ever made.

I see that the Rug Warrior Pro uses a 68HC11.  Forth exists
for this processor.

for tutorials see http://www.forth.org/tutorials.html
contact me if you want more assistance.


Augustus Gustavius Salvatore Calabrese 720.222.1309    AGSC
http://www.omegadogs.com   Denver, CO

2005\07\19@094613 by Bill & Pookie

picon face
Forth is a great language for hacking.  It gives immediate response, no
setting new project, running the compiler, linker, or even telling it to run
is required.

It is wonderful for discovering how a new piece of hardware or i/o works.
But as the program grows it gets foggy.  Like trying to herd cats.

The idea of writing your own interpreter sounds interesting plus it has the
benefit of allowing students that have the desire, to add to and modify the
interpreter that was written in c.

Bill

{Original Message removed}

2005\07\19@101217 by D. Jay Newman

flavicon
face
> Forth is a great language for hacking.  It gives immediate response, no
> setting new project, running the compiler, linker, or even telling it to run
> is required.

Yes. It is *extremely* easy to do simple things in Forth.

I will admit that the first major project I did when I got a 68000 was
to write a Forth system for it. I wrote the bare minimum in assembly
code/pre-digested-Forth and the rest in real Forth. It took me about
a week.

> It is wonderful for discovering how a new piece of hardware or i/o works.
> But as the program grows it gets foggy.  Like trying to herd cats.

That is a good analogy. One way to think of Forth is that you're writing
an application-specific language using Forth as the lower level. That
can simplify things.

On the other hand, I wouldn't want to write a truely large program in
Forth. I still have nightmares from my last job of the tutorial that
wouldn't die (a *large* mechanics tutorial written in Java -- with the
base classes written by a grad student who didn't understand Java); I
got put on the project towards the end as a firefighter.

> The idea of writing your own interpreter sounds interesting plus it has the
> benefit of allowing students that have the desire, to add to and modify the
> interpreter that was written in c.

The interpreter/compiler can be written in pretty much anything. Programming
in Forth  is very different than programming in any other language.
--
D. Jay Newman           ! Polititions and civilations come and
RemoveMEjayTakeThisOuTspamsprucegrove.com     ! go but the engineers and machinists
http://enerd.ws/robots/ ! make progress

2005\07\25@175219 by Wouter van Ooijen

face picon face
> I'm looking for some advice. For the past two summers I've taught an
> electronics/robotics class to high schools students (9th-11th
> graders) and

An indication of their age would be more informative for those who do
not share your educational system :)

> While my teaching may be at fault, I think the larger problem
> is that C is a
> poor language for beginners. Six weeks is also a short period
> for such an
> introduction to programming...

What are your objectives? Programming is difficult no matter which
language is used. C adds some difficulty of its own, but often C is the
only way to go (for instance when you want to get a job in embedded
programming, unless you want to work with/for Olin of course).

I have tried to learn kids PIC using Jal, but that was at a hobby club.
I don't think they grasped much, but it was fun.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\07\25@201758 by ChrisPicList

flavicon
face

> I'm looking for some advice. For the past two summers I've taught an
> electronics/robotics class to high schools students (9th-11th
> graders) and

An indication of their age would be more informative for those who do
not share your educational system :)

> While my teaching may be at fault, I think the larger problem is that
> C is a poor language for beginners. Six weeks is also a short period
> for such an introduction to programming...

Hi,

Have you looked at the BoeBot from Parallax? The BoeBot is based on the
Basic Stamp series. It comes with an excellent book and tutorial. One of
the things I like about this kit is that as you advance you can replace
the basic stamp with more powerful chips. I use mine as a test platform
for PIC based robotics projects. You can read the included book and
learn more about the kit by visiting the Parallax web site
(http://www.parallax.com)

-Chris



2005\07\25@220624 by techy fellow

picon face
Perhaps, you can try using a full blown version of a robotic software that comes with Lego MindStorm. Lego also sell just the software for simpler robotic projects. Both software program its Lego RCX brick in pictorial style. If you want more control then, use a freeware called, NQC (Not Quite 'C') which is a simpler version of 'C'. Unfortunately, I cannot remember what's the name of the 2 software from Lego.

ChrisPicList <spamBeGoneChrisPicListspamBeGonespamrocklizard.org> wrote:
> I'm looking for some advice. For the past two summers I've taught an
> electronics/robotics class to high schools students (9th-11th
> graders) and

An indication of their age would be more informative for those who do
not share your educational system :)

> While my teaching may be at fault, I think the larger problem is that
> C is a poor language for beginners. Six weeks is also a short period
> for such an introduction to programming...

Hi,

Have you looked at the BoeBot from Parallax? The BoeBot is based on the
Basic Stamp series. It comes with an excellent book and tutorial. One of
the things I like about this kit is that as you advance you can replace
the basic stamp with more powerful chips. I use mine as a test platform
for PIC based robotics projects. You can read the included book and
learn more about the kit by visiting the Parallax web site
(http://www.parallax.com)

-Chris



2005\07\26@065827 by Russell McMahon

face
flavicon
face
Something like PC Robots cou;d be adapted fro real machines

Old

       http://www.informatik.uni-frankfurt.de/~hbecker/pcrob.html

Newer but about old stuff

       http://www.pscs.co.uk/pcrobots/

Google says

       http://www.google.co.nz/search?hl=en&q=PCROBOTS&meta=



       RM


2005\07\26@074901 by Lindy Mayfield

flavicon
face
Fischer Technick (http://www.fischertechnik.de/ ) also has something comparable to Lego's.  I'm sure it isn't unique, but the programming language is all GUI based.  You copy and paste the logic symbols and connect them with lines to program it.  Quite involved.

I forget the chip it uses, but not one I've ever heard of.  

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...