Basic STAMP 2px and two 3-Axis Accelerometer H48C HELP!
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
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 Savage
Parallax Tech Support