01-09-2013 07:37 AM
Hello Gert-Jan,
Can you send the working VI please? I tried it accordig to your block diagram but I couldn't get it worked? If possible, I will appreciate it.
01-09-2013 08:26 AM
https://decibel.ni.com/content/docs/DOC-26332
Keep an eye on the wiring as drawn in my previous post!
01-09-2013 09:22 AM
Hello again,
I got it after I asked for the VI thank you very much, I made a mistake with the connection.
Could you possibly know how to connect multiple adxl345 or is it possible with Arduino? I need two of them at least. And is there a way in labview to visualize orientation?
01-09-2013 11:47 AM
Hi,
2 accelerometers is possbile! you just have to choose another device address for the second accelerometer (you can choose between 0x1D and 0x53).
In the datascheet (see link), on page 10 there is a descripion how the set the addres (set some pins to high or low). After setting the address you have to change the vi and set up the second device with his address.
Greets, Gert-Jan
01-11-2013 07:26 AM
Hello again,
I haven't tried 2 accelerometers yet. But I am sending the VI I was working on. I hope with some help we can make it better. I was trying the visiluaze it in 3D. I got it working but the problem is I couldn't get Z axis working properly. It may be my sensor but probably it is the VI. Also I couldn't make the movement continuous after 360degree it turns to all the way to zero and does not seem all right.
I eventually want to use data for PID control of a couple dc motors with visual. Any help will be appreciated.
03-04-2013 05:49 AM
Hey
thanks a lot for this VI.
I have connected the pins as you have shown in your picture but it's not working. There is no error shown.
What sketch do i have to use for the arduino?
Greets, gs
EDIT: Everything is working fine thanks a lot
But I still have a problem with my laptop port. Everytime I stop the VI i can't start it again because of connection issues to Arduino.
I'm using Win7.
If someone has an idea it would be nice if he could tell me.
greets
03-04-2013 09:07 AM
gs_uno wrote:
But I still have a problem with my laptop port. Everytime I stop the VI i can't start it again because of connection issues to Arduino.
I'm using Win7.
If someone has an idea it would be nice if he could tell me.
greets
Generally, this happens when you stop the VI with the "abort execution" button (the stop sign). Never use the abort execution button when working with Arduino, you must always let the Close.vi run to successfully clear the VISA resource.
04-04-2013 08:30 PM
Hi,
Here is an improved version that incorporates all 10 bits (or max 13 bits in full resolution):
The credit of the above fix goes to Nathan_B., who has provided us w/ a neat library.
BTW, I fixed a couple of minor bugs in Nathan's LIFA ADXL345 library. Please refer to: https://decibel.ni.com/content/docs/DOC-28504
Thanks to Gert-Jan_A and Nathan_B. for their generosity.
Cheers
Updated test adx345 2010: removed a TypeDef dependency that wasn't included here as a separate .ctl
05-18-2013 07:27 PM
Hi,
I am trying to connect multiple ADXL345 to ARDUINO board (Via I2C), Do you have a source code for that. I have tried SPI with ADXL345 and have a VI for that but do you have a vi for SPI (For multiple accelerometers). What is the maximum number of ADXL345 I can connect to ARDUINO ? Any help is appreciated.
Thank you!
05-19-2013 01:03 AM
If using I2C you are only able to use two ADXL345s. You will need to make sure the second one has the alternate device address. If using SPI, I believe simply requires just another chip select pin.