Shop OBEX P1 Docs P2 Docs Learn Events
Programming Servos — Parallax Forums

Programming Servos

the23rdirishmanthe23rdirishman Posts: 2
edited 2008-05-02 17:48 in General Discussion
I am new to robotics, and I can't find anything that explains how to program for the javelin stamp. For example, how would I program the robot to follow the border of a 1x1 meter square? The code should be relatively simple, I just figure out the significance of start(), stop(), and update() in getting the Boe-Bot (Rev B) to drive in different patterns.

I also don't understand why the following code makes the robot drive straight in some cases, and pulse a few times before driving straight in others:

leftServo.update(230, 2304);
CPU.delay(1000);
rightServo.update(130, 2304);

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-04-30 17:49
    Get the JBot package located here:
    http://tech.groups.yahoo.com/group/JavelinCode/files/Javelin%20Stamp%20IDE/lib/JBot/

    Also get the Robotics v2.2 text (also at above link) which uses the basic stamp as the mcu
    but that text holds the pictures which are not present in the JBot package.

    The·chapters should explain·how·to program the servos.

    regards peter
    ·
  • the23rdirishmanthe23rdirishman Posts: 2
    edited 2008-05-02 17:25
    Is there a version of the Robotics v2.2 text for the Javelin stamp? That's really all I need.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-05-02 17:48
    The chapters from the JBot package are the v2.2 robotics text.
    Unfortunately Parallax never completed the text and included updated pictures.
    So what you need to do is locate the appropiate text in the v2.2 robotics
    and then you will find the missing pictures. Although written for the basic stamp
    the hardware connections are simular to the javelin connections.
    The example code for the javelin is working and as such should be your guide.

    regards peter
Sign In or Register to comment.