Shop OBEX P1 Docs P2 Docs Learn Events
Basic STAMP 2px and two 3-Axis Accelerometer H48C HELP! — Parallax Forums

Basic STAMP 2px and two 3-Axis Accelerometer H48C HELP!

PAX-OPAX-O Posts: 5
edited 2007-07-26 19:36 in BASIC Stamp
Hello everyone! I have recently finished building one of my projects and I finally got to the part when i have to program the stamp to do my bidding. I have a USB board of education and a BS2px that I am trying to convince to work with 2 H48C 3-axis accelerometers and my problem is that when i placed the accelerometer on the board and made all the connections one of the accelerometers would give me really weird number like:

Count Volts G


VRef 2049 1.651
X 2045 1.647 0.00
Y 355 0.286 -3.72
Z 2489 2.005 0.96


and the other would give me just 0.0 all over the map. I have spoken with tech support and the guy told me that the problem is that the BS2px is so much faster than the BS2 that the code that is available in the H48C .pdf is not going to work because of the timing of some of the commands in the code. Because I'm a beginner programmer I have no idea where to start at all and I was wondering if you guys can give me some pointers as to how to convert the following debug code from the BS2 to work normally with the BS2px.

The following code is a copy paste of the H48C pdf with two modifications the first one is that it says {$STAMP BS2px} in the header and the second is Clk PIN 15 and Dio PIN 14 because i had to match those with the pins on the accelerometer.

So what I need is help with making this code work with the BS2px. I believe that this code requires some PAUSE commands to make the STAMP wait for data or something like that but I don't know where they should be or how long.. Any help or tips would be greatly appreciated!

Post Edited (PAX-O) : 7/25/2007 12:57:58 AM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-07-26 14:54
    Do you have a BS2 or other Module to confirm operation on? I don’t recall there being any timing problems on the BS2px with that sensor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • PAX-OPAX-O Posts: 5
    edited 2007-07-26 19:36
    I do not have anything else but the BS2px.... So should I just call back and try to get an RMA number or something? And I agree.. i have made a few code modifications myself and I noticed that no matter how many pauses i put in between the lines of code to account for the speed of the 2px the sensors are giving me the exact same values.
Sign In or Register to comment.