Shop OBEX P1 Docs P2 Docs Learn Events
Tiny Logo for the S2 posted — Parallax Forums

Tiny Logo for the S2 posted

Freak C.Freak C. Posts: 5
edited 2013-05-30 21:01 in Robotics
Hi all,

I have just posted a Tiny Logo implementation for the S2 on the Object Exchange. It has a lot of Logo commands plus all commands necessary to control the S2. You can use a TTY console to program the S2 interactively (TO is supported, so you can define own procedures), or you can download either source code or precompiled programs. It comes with its own versions of the S2 and S2Music objects, where I removed the song tables and the ability to play entire songs in order to save some memory space, because I crammed all I could into that Tiny Logo.

Complete documentation as a PDF is supplied so you can find your way through Logo and its implementation.

I would love to see feedback from you; especially, bug reports are welcome, because I as the programmer am probably too limited to debug my own code :smile:

Michael

Comments

  • Ken GraceyKen Gracey Posts: 7,392
    edited 2012-04-10 09:29
    Guten Tag Freak C. -

    I look forward to taking a look at the Logo commands. I could probably use them in the course I'm teaching right now in middle school. Logo could add yet another way to program the S2 - between all of the Propeller languages, the S2 GUI, and some of the really neat applications showing up on this forum there's a lot to show.

    I'll try to do a look by this weekend, but next week is more realistic. In the meantime I'm sure some other S2 users will show up.

    Vielen Dank,

    Ken Gracey
  • PublisonPublison Posts: 12,366
    edited 2012-04-10 09:39
    I'm guessing it's this one?

    http://obex.parallax.com/objects/855/

    J
    im
  • Freak C.Freak C. Posts: 5
    edited 2012-04-10 09:54
    Yes, it is! Thank you for posting the link.

    Michael
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-04-10 10:25
    Michael,

    Wow, this is great! I've been waiting to see who would do this, and now you've set the keystone of the arch into place. With the pen lifters by W9GFO, NikosG, Chris Savage, et al., along with wireless connectivity, and now your Logo implementation, the S2 should be completely capable of turtle graphics -- without the tether! Congratulations!

    -Phil
  • nglordinglordi Posts: 114
    edited 2012-04-11 11:07
    Michael:

    I have downloaded tiny logo to my S2. However, instead of V.1.0 I get V0.10. Also several
    commands are not recognized, e.g., LIGHTS, BATT, S.xxx.... Have you placed the
    correct version in the object exchange?

    I believe that using logo to program the S2 is a great idea. It would be advantageous
    to do this using XBees for wireless communication. Have you thought about the feasibility
    of doing this?


    NickL
  • NikosGNikosG Posts: 705
    edited 2012-04-11 11:48
    Freak C. wrote: »
    Hi all,

    I have just posted a Tiny Logo implementation for the S2 on the Object Exchange. It has a lot of Logo commands plus all commands necessary to control the S2. You can use a TTY console to program the S2 interactively (TO is supported, so you can define own procedures), or you can download either source code or precompiled programs. It comes with its own versions of the S2 and S2Music objects, where I removed the song tables and the ability to play entire songs in order to save some memory space, because I crammed all I could into that Tiny Logo.

    Complete documentation as a PDF is supplied so you can find your way through Logo and its implementation.

    I would love to see feedback from you; especially, bug reports are welcome, because I as the programmer am probably too limited to debug my own code :smile:

    Michael

    Hi Michael, and everybody.

    Can you give some more information about the whole procedure please?
    What we must do in order to run the LOGO using our S2 robots and the code you posted on OBEX? Can you describe the steps we have to follow please?
    We need and other software (any LOGO environment?)
    What should be the communication between S2 and PC? You use the USB cable or a wirless conection?
    Where we type the LOGO commands? (I mean commands like FD 50, RT 90, REPEAT e.tc.)
    What is the TTY console you said before?
    Can you send any image?

    The idea to run LOGO with S2 is Amazing. However I can't understand the method that you describe....Or I have in mind somethig completely different.....

    Thank you,
    Nikos
  • nglordinglordi Posts: 114
    edited 2012-04-11 17:38
    Michael:

    I have changed the Rx & Tx pin assignments in S2Mini.spin to conform to my
    Xbee connections to the S2 hacker port and the serial baud setting in TinyLogo.spin.
    The later was compiled using the propeller tool and loaded into the S2 eeprom..
    This enabled me to communicate with the S2 untethered. So far I have found only
    one command that fails - MOTORS - it results in an error message indicating that
    there was insufficient input. The (MOTORS .....) works.

    I suggest that the TO procedure should be described in more detail in the documentation,
    with examples. The use of colons is not explained.

    Nikos:

    Just download TinyLogo.spin to the S2 using the propeller tool and communicate with the S2 using PST.

    NickL
  • NikosGNikosG Posts: 705
    edited 2012-04-12 00:40
    @ nglordi, thank you I run the code using the PST.

    The result was very impressive!!!

    Congratulation Michael!!! I'm curtsy!

    Especially the ability of "TO" command in order to create subroutines I know is great achievment in this SPIN code!!!!!

    The only thing it needs is the wireless communication and one more attractive user interface(like the original LOGO or the "Microwords").
    I have in mind a graphic environment on computer screen with a small virtual S2 turtle which will be able to do the same things at the same time on the screen as the real S2 robot into the ground!!!
    I wonder if there is a way to make an original LOGO interface (e.g. Microwords) to communicate directly with S2 robot. (This will be a revolution especially in Greek education! All the secondary schools have LOGO as the basic topic on ICT lessons and an S2 turtle robot would be a great teaching tool in every class!)

    Nikos
  • Freak C.Freak C. Posts: 5
    edited 2012-04-12 10:34
    Hi Nikos,

    actually, Tiny Logo is a spin-off of a new version of Terrapin Logo thatI am working on. That Logo version will have direct S2 support, so it will work exactly as you envision :) There will be a S2.OPEN command that creates a small S2 avatar on the Graphics screen, and you will then be able to shoo the S2 around using Logo - it will talk to Tiny Logo using its ability to execute downloaded code. If you like, I will be happy to add you as a beta tester. Please contact me directly.

    BTW - the entire process is described in the document that I posted together with the object.

    @NickL - the TinyLogo.eeprom in the object is ancient - I forgot to create a new file. Sorry. Please do not use the .eeprom file. The MOTORS command has a default argument count of 1, but should have been 2.

    I have prepared a new Zip file and updated the object.
  • NikosGNikosG Posts: 705
    edited 2012-05-28 15:35
    nglordi wrote: »
    Michael:

    I have changed the Rx & Tx pin assignments in S2Mini.spin to conform to my
    Xbee connections to the S2 hacker port and the serial baud setting in TinyLogo.spin.
    NickL

    nglordi,

    Do you use the following connection between X-Bee and S2?

    attachment.php?attachmentid=93042&d=1338243915

    if yes, the changes you have made on S2Mini spin code are only theese on the red circle on the following image? Or you have made and other changes?

    attachment.php?attachmentid=93043&d=1338244352

    Thank you,
    Nikos
    693 x 411 - 41K
    1008 x 628 - 187K
  • nglordinglordi Posts: 114
    edited 2012-05-29 18:32
    Nikos:

    Yes - except I place a 4.7K resistor between P1 and XBee Din, since the S2 pins are pulled high to 5V and the XBee input is 3.3V.

    NickL
  • GarethGareth Posts: 278
    edited 2013-05-15 09:02
    This is exactly what i have been looking for......... its a very neat implementation of Logo ....
    .... just about to set up the Xbee links.......

    Have you done any experimentation with logo alphabet/character drawing ?

    regards Gareth
  • GarethGareth Posts: 278
    edited 2013-05-17 13:49
    XBee links work fine......dead easy to control the S2 direct from Serial Terminal ..... and i have to say i am impressed with the S2`s accuracy via Logo .... excellent......
    IMG_2637.JPG
    IMG_2640.JPG
    640 x 480 - 168K
    640 x 480 - 158K
  • bee_manbee_man Posts: 109
    edited 2013-05-19 20:00
    How about a video of the S2 running LOGO?

    This would be great with Phil's Plug-in-XBee- Adapter. I don't know what ever happened to that project.
    http://forums.parallax.com/showthread.php/139932-Plug-in-XBee-Adapter-for-the-S2
  • bee_manbee_man Posts: 109
    edited 2013-05-30 21:01
    The PENUP and PENDOWN are not implemented or did I miss it. Is there some documentation of the command's available? It's been a long time since I programed TI LOGO (30+ years ago, so I need a lot of help).
Sign In or Register to comment.