PBP projects for R/C models


Closed Thread
Results 1 to 40 of 772

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Worked for me

    Originally Posted by mackrackit :
    I just drove home trying to simulate Ken's car. Pulsed the same degrees left or right, more pulses left or right for turns but always the same, say 5 degrees off center, and after each pulse returned to center.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    GEE, I thought no one was listening - LOL
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  3. #3
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default Your full size scale car has toe in and caster....

    My toy car has neither toe in nor caster. But it should be able to react. It does not. If you are in a helping mood here is both a (disappointing) video, and a pointer to my code.



    http://www.employees.org/~kjones/ToyCarKickTurn3.htm

    Could the PIC be resetting? Am in a looping loop? The whole thing is only 503 words compiled. My guess is that I am not seeing something that right in front of my eyes...

    Ken

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Wondering if the part in RED is causing the trouble? If it were eliminated and sent to
    CheckIfInDanger:
    after
    keepreversing:
    was satisfied???
    Code:
     keepreversing:
    WHILE rangefront < stopreversing
    ' We have not reversed far enough
      HIGH stopgo  'go
      LOW forrev   'back
      GOSUB triggers
    WEND
    
    '------------------------------------
    'done reversing.  Go straight or turn left depending on right 
    'ping. If > outertrack then out in the middle.  If < desiredtrack 
    'then stuck on wall. 
    IF rangeright > desiredtrack THEN 
    'steer left
      LOW turnon   'steer
      HIGH steerto  'left
      steeringstate = 1
      HIGH stopgo   'go
      HIGH forrev   'forward
      PAUSE 500
    'hpwm 2,Forward,50  --Already going Forward
    ENDIF
    GOTO main
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default Seems to work OKAY on the bench

    Went to bed last night puzzled.

    Checked the car (untouched since disastrous demo yesterday) on the bench. Seemed to react correctly and quickly. The stimuli are my hands moving as quickly as I can make them.

    Hmmmm.....

  6. #6
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default This must be the looping triggers section

    Could it be that somehow this tight loop eliminates the ability to react to the front SONAR. The video shows the car stuck against the wall in total silence with the front LED constantly on. This WHILE loop could cause that if somehow the two drive motor instructions were being short changed. Maybe I need a PAUSE in here. It would do no harm.

    Code:
     keepreversing:
    WHILE rangefront < stopreversing
    ' We have not reversed far enough
      HIGH stopgo  'go
      LOW forrev   'back
      GOSUB triggers
    WEND

  7. #7
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Smile Success!!

    Take a look at:



    Please tell me what you think.

    Ken

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP Extensions, What are they?
    By PJALM in forum PBP Extensions
    Replies: 9
    Last Post: - 28th September 2021, 11:26
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30
  5. Making PBP code more modular
    By forgie in forum General
    Replies: 30
    Last Post: - 25th October 2005, 16:24

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts