Shop OBEX P1 Docs P2 Docs Learn Events
Boe-Bot Help, please — Parallax Forums

Boe-Bot Help, please

morganemorgane Posts: 5
edited 2012-10-08 17:55 in Robotics
So I am building a Boe-Bot for my freshman engineering class and my teacher isnt much of a help, so I was thinking someone here could maybe help me out? :)

I just connected my whiskers and I was doing the little test them thing, where when you press the left one its suposed to change P5=1 to P5=0, and that worked fine, however when I pressed the right whisker either 1) nothing happened, or 2) it did the same thing as the other one.

I had multiple people look at both my Boe-Bot and my program and they all thought it looked correct. I was wondering if anyone had any solutions to this??

Thanks so much!!

Comments

  • Martin_HMartin_H Posts: 4,051
    edited 2012-10-08 08:18
    It sounds like a wiring error. If you can post a high res photo we might be able to point it out to you. But make sure one whisker is below the nylon washer and the other whisker is above the nylon washer. Both whiskers might be making contact with the same pin.
  • morganemorgane Posts: 5
    edited 2012-10-08 08:36
    One is below and one is above, but I'll post a picture later tonight when I get back home
  • gennarobasso81gennarobasso81 Posts: 84
    edited 2012-10-08 09:09
    are you using the code that came with the boe-bot or did you write your own? If it's your own please post it and I will look it over. Without looking it sounds like it my be something with the way you have the VAR written. If p5 is picking up 1 or 0 from a VAR. Might be that you have the left whisker written frist...and if you are using a BS2 it will read in a first come first serve format, so if your VAR are not written correct or if you are using the same VAR for left and right Whisker you might get a P5 signal problem.

    I dont know though...just a random though.

    once we see the code we can tell for sure
  • Matt GillilandMatt Gilliland Posts: 1,406
    edited 2012-10-08 10:53
    Hi morgane-
    Since this is a robotics question, this would be the appropriate forum to get some help from our robotics community :-) As I mentioned earlier, get us some pics and code listings, and somebody here will help get you going :thumb:
    and again, Welcome to the Forums!
    -MattG
  • morganemorgane Posts: 5
    edited 2012-10-08 17:22
    So my pictures wont upload, so until I can figure that out here is the code...

    '{$STAMP BS2}
    '{$BASIC 2.5}

    DEBUG "WHISKER STATES", CR,
    "Left Right", CR,
    "

    "

    DO
    DEBUG CRSRXY, 0, 3,
    "P5 = ", BIN1 IN5,
    " P7 = ", BIN1 IN7
    PAUSE 50
    LOOP
  • ZootZoot Posts: 2,227
    edited 2012-10-08 17:33
    Presuming your wiring is OK, and one whisker goes to P5 and one to P7. And presuming you have correct pull-down resistors on each pin (i.e. 10k-20k between the input pin and ground), then your code looks OK.

    Try removing one whisker and see if the other one works correctly. Then take the other whisker off and put the first whisker back on. See if just that one works correctly. Then you will at least know if it's one whisker with a problem, or the other, or if there is only a problem with both installed. Then you can narrow down to whether it's a mechanical issue w/the installation of the whiskers themselves (e.g. whiskers touching sometimes, bad contact with the ground platform) or the wiring to the Stamp. Photos would really help -- did you get a message when you tried to upload your images?
  • morganemorgane Posts: 5
    edited 2012-10-08 17:38
    I did take the whiskers off and switch sides, same result, I also tried moving the connections to different i dont know what to call them, ports? Like from P7 to P8. and nothing different happened. But thanks.

    And with the pictures when I tried uploading from my computer it came up with a little exclamation point, so I'm trying to put them online and get a URL and try it that way.
  • ZootZoot Posts: 2,227
    edited 2012-10-08 17:55
    Don't switch the whiskers -- just leave ONE whisker on, and the other off. Then take that whisker off and put the other one on. Test EACH separately and see which -- or both -- is the problem. That at least narrows it down quite a bit. The are called "pins". A port is group of pins that generally can be read/written as a single byte or word (i.e., groups of 8 pins are "ports"). I wouldn't start moving everything around looking for random problems until you narrow down just what your problem is, in more or less this order:

    - is it one whisker, or both?
    - is it mechanical (the whisker/mounting itself)?
    - is it wiring to the microcontroller?
    - is it the code? (which looks fine, btw)
Sign In or Register to comment.