To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 8537
8536  |  8538
Subject: 
JRM code and Reset
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Wed, 2 Jan 2002 02:03:20 GMT
Viewed: 
1774 times
  
John,
I added a little sub routine to your program, see if you can use it this way.
Probably not, but hey it's worth a try. Also, if you don't mind I'd like to
post it to the yahoo handyboard files too at
http://groups.yahoo.com/group/handyboard/files/
-Dan

/* filename: jrm1.c    John R. McDaniel */

   void main()
              {

   init();         /* Run initialize routine */

   while(1){ /*do this loop endlessly*/


   printf("Test Motors !!\n");   /*print 'Test Motors !!' on LCD*/

   ao(); /*both motor off for 2 seconds*/
   sleep(2.0); /*delay start so can unplug cable*/

   /*go forward*/
   printf("Forward\n"); /*print 'Forward' on LCD*/
   fd(0); /*left motor forward*/
   fd(2); /*right motor forward*/
   sleep(3.0); /*do this for 3 seconds*/
   alloff(); /*let motors coast to stop*/
   sleep(1.0);

   /*turn right*/
   printf("Right\n"); /*print 'Right' on LCD*/
   fd(0); /*left motor forward*/
   bk(2); /*right motor backwards*/
   sleep(2.0); /*do this for 2 seconds*/
   alloff(); /*let motors coast to stop*/
   sleep(1.0);

   /*turn left*/
   printf("Left\n"); /*print 'Left' on LCD*/
   bk(0); /*left motor backwards*/
   fd(2); /*right motor forward*/
   sleep(2.0); /*do this for 2 seconds*/
   alloff(); /*let motors coast to stop*/
   sleep(1.0);

   /*go backward*/
   printf("Back\n"); /*print 'Back' on LCD*/
   bk(0); /*left motor backwards*/
   bk(2); /*right motor backwards*/
   sleep(3.0); /*do this for 3 seconds*/


   alloff(); /*all motors off, rest until next loop*/
   printf("Loop Done\n"); /*print 'Loop Done' on LCD*/

   sleep(5.0); /*pause before doing loop again*/

   }
   }

   /* end */

   /* ****************** Subroutines ************************* */


   void init()
   {
        printf("Press Start to  Go!\n");
        while(!start_button()){}
        tone(800.,1.);
  }



Message has 1 Reply:
  Re: JRM code and Reset
 
Dan, Thanks for hanging tough on this problem.....I'm feeling really inadequate on this one. I downloaded your revision of my program and it did not help. Of course, if I do type " main() " on the PC, it does give your "Press Start....." message and (...) (23 years ago, 2-Jan-02, to lugnet.robotics.handyboard)

16 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR