Shop OBEX P1 Docs P2 Docs Learn Events
Basic 1 programming EEPROM problem — Parallax Forums

Basic 1 programming EEPROM problem

capercaper Posts: 9
edited 2004-10-30 20:24 in BASIC Stamp
hey guys...i got a EEPROM QUESTION

BACKGROUND: i got my robot set up hardware wise·and ready to detect the thickness of copper lines laid on the ground...the·Left sensor P6 and·right sensor P7·consist of two dragging metal wires each that when they·drag against the ground look for copper wire and actually hit the copper foil tape, it makes a connection and sends a signal to the board....1 if its makes a connection, 0 if its just concrete and no connectoion

THE PROBLEM: ok i wrote a program attached that is saying EEPROM....probably because i need the robot to naviagate itself by counting the number of "power steps" the·stepper·motor takes once the left or right sensor in the middle of the bot touches first to when the opposite sensor touchs....THIS WAY, i can store that value, brake the first touch sensor's wheel side(so if right sensor touched first,·the·robot will brake right wheel)·and have the basic stamp calculate how much steps the second wheel needs to turn in the reverse direction to align the robot perpendicular to the copper foil tape.

ALSO: Im trying to navigate between two circles of copper tape...the outer is 4 inches wide, while the inner is 1 inch wide... THE OUTER circle at 60 inches diameter aligns the robot to the center and tells it which way the target is, basically whether if its infront of it or behind it, then the robot drives forward to find the inner circle, which aligns it again to the center

now that you understand what im doing, you guru programers probably know EXACTLY what im doing wrong to fill up the EEPROM....and how i can go about fixing it...

THANKS guys

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-30 17:27
    I'm betting that you are out of eeprom. The BS1 has *very* limited resources, compared to the BS2. I know it's cheaper, but the BS2 is so much superior -- much more RAM and program memory.
  • capercaper Posts: 9
    edited 2004-10-30 17:30
    so is there anything i can do? is there a better way to calculate the alignment of the robot and distance from the center other than counting the steps? cuz counting the steps is what is causing the EEPROM to be full right?

    and does that program look ok??
  • capercaper Posts: 9
    edited 2004-10-30 19:31
    ok...so is the problem that the bs1 board only holds 80 lines or is it something else...i dont know where to find the specs
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-30 20:24
    You're doing a lot of "brute force" coding that is leading to redundancies -- that are just chewing up EE space.· If you take another approach, you may be able to squeeze your program into the BS1.· Here's an example of how you might rewrite one of your code sections to save space:

    Point_Up:
      FOR idx = 0 TO 3
        check = PINS / 64
        IF check > 0 THEN Line_Width
        LOOKUP idx, (%01010, %01100, %00101, %00011), PINS
        PAUSE Delay
      NEXT
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
Sign In or Register to comment.