Shop OBEX P1 Docs P2 Docs Learn Events
Communication between BS2 and BS2P (Transfering Compass angle HM55B) — Parallax Forums

Communication between BS2 and BS2P (Transfering Compass angle HM55B)

ShanShan Posts: 6
edited 2007-11-30 03:54 in BASIC Stamp
i'm controlling my robot using BS2P.·Due to insufficient I/O i put Hitachi HM55B digital compass in a BS2 board. I want to transfer the compass angle in BS2 board to the BS2P main board. it was successful.·But i have two problems.
··· 1) First problem is In BS2P board the compass angle never update. What ever direction i turn the·compass It always gives the first angle i recieved. But in BS2 board i can get the angle accurately.
··· 2) Second problem is sometimes in BS2P board i get wrong angles. Sometimes i feel like some data is being lossed.

·I have attached the codes i was using.
Plese help meconfused.gif

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2007-11-29 16:38
    Hi Shan, try the following modifications to your code.

    In the BS2p SERIN 0, 240,200, waitack, [noparse][[/noparse]DEC3 sData]

    and the BS2 SEROUT Serial_Pin, BMode, [noparse][[/noparse]DEC angle,10]

    it may help synchronize the data, I added a little extra wait time in the BS2p also.

    Jeff T.

  • ShanShan Posts: 6
    edited 2007-11-30 03:54
    Thank you for your reply. i try and let you know the performance.
Sign In or Register to comment.