Shop OBEX P1 Docs P2 Docs Learn Events
Stamp program problem — Parallax Forums

Stamp program problem

dayhkrdayhkr Posts: 4
edited 2009-10-31 00:04 in BASIC Stamp
I am hoping someone here can point out what I am missing I am using a BSII stamp to control a motor that rotates a webcam left, right or center.··I have the BSII connected to a Pololu motor controller and this is controlling a motor with a board to·sense positions.· I am feeding 5v into the position board and as I turn the motor I read the pins for R,L, and center.··I have the controller working but the issue is it will work once and won't work again unless I re-download the code to the stamp.· I have been messing with it for about an hour or two and I can not get it to run more than one time after downloading to the stamp I am sure it is something easy but I am not seasoned enough with the stamp to figure it out.· If I need to upload the code let me know and I will do so.

http://www.digital-domain.us/camtest.txt

Post Edited (dayhkr) : 10/30/2009 3:42:44 AM GMT

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-10-30 03:24
    How about a link to the board, how you have it connected including the power connections and the program you are using in the stamp?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • dayhkrdayhkr Posts: 4
    edited 2009-10-30 03:37
    I have attached a text file of the config I ended up with I stripped it down to see if I could get it to work.· I am pretty sure that the power and everything is good I have used this board before and had no problems it is just this code that I am having an issue with.· If I run the cam with out the position sensing it works just fine let me see if I can get a decent picture of the connection together and post them.
  • FranklinFranklin Posts: 4,747
    edited 2009-10-30 03:45
    Your returns are in the wrong places. Run through your code and see where you end up.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • dayhkrdayhkr Posts: 4
    edited 2009-10-30 19:02
    Sometimes after looking at your code for several hours you just need to walk away maybe sleep and try again.· Thanks for your help I recoded a few things and it started working as advertised if your interested I have a video of the cam part of my bot which is now functioning.·

    http://qik.ly/nfDa
  • vaclav_salvaclav_sal Posts: 451
    edited 2009-10-30 23:32
    Taking a break from coding is good,however, posting a code without any comments what it does is very ineffectiive. The only thing I noted that your if /than commands have questionable value if you exit or return from your subroutine. It may be what you wanted· but without comments....
  • dayhkrdayhkr Posts: 4
    edited 2009-10-31 00:04
    Yeah I messed with it some much·and I was so tired by the time I posted that code that I didn't follow my usual rules I appreciate people still trying to help me even under the circumstance and in the future I won't do that again.· [noparse]:)[/noparse]
Sign In or Register to comment.