Shop OBEX P1 Docs P2 Docs Learn Events
Memsic 2125 Accelerometer on bs2px — Parallax Forums

Memsic 2125 Accelerometer on bs2px

pusinkpusink Posts: 68
edited 2011-07-24 05:46 in BASIC Stamp
i already refer this link http://www.parallax.com/Portals/0/Downloads/docs/prod/acc/memsickit.pdf (Experiment 1: Dual-Axis Tilt Measurement) but not have bs2px...i try using this code but the reading not correct...when i use this code for bs2p40,is ok.., pls help me...tq.

Comments

  • PublisonPublison Posts: 12,366
    edited 2011-07-24 05:46
    Try adding the the CASE statment for the BS2PX to the #SELECT $STAMP list, (last two lines in the code listing).
    ' Set scale factor for PULSIN
    #SELECT $STAMP
      #CASE BS2, BS2E
        Scale CON $200     ' 2.0 us per unit
      #CASE BS2SX
        Scale CON $0CC     ' 0.8 us per unit
      #CASE BS2P
        Scale CON $0C0     ' 0.75 us per unit
      #CASE BS2PE
        Scale CON $1E1     ' 1.88 us per unit
    [COLOR="red"]  #CASE BS2PX
        Scale CON $0CF     ' 0.81 us per unit[/COLOR]
    #ENDSELECT
    

    (I took the scale factor from page 345 in the Stamp Manual 2.2).
Sign In or Register to comment.