You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I try to connect my ADXL362 with my ARDUINO Mega 2560 on SPI.
I've connected the ADXL362 trough a Logic Level Shifter, 4-Channel, Bidirectional to the Arduino and when I try the SampleRead code, I can just see the XValue. YValue, ZValue and temperature still stay at "-1".
My code is :
`/*
ADXL362_SimpleRead.ino - Simple XYZ axis reading example
for Analog Devices ADXL362 - Micropower 3-axis accelerometer
go to http://www.analog.com/ADXL362 for datasheet
License: CC BY-SA 3.0: Creative Commons Share-alike 3.0. Feel free
to use and abuse this code however you'd like. If you find it useful
please attribute, and SHARE-ALIKE!
// read all three axis in burst to ensure all measurements correspond to same sample time
xl.readXYZTData(XValue, YValue, ZValue, Temperature);
Serial.print("XVALUE=");
Serial.print(XValue);
Serial.print("\tYVALUE=");
Serial.print(YValue);
Serial.print("\tZVALUE=");
Serial.print(ZValue);
Serial.print("\tTEMPERATURE=");
Serial.println(Temperature);
delay(100); // Arbitrary delay to make serial monitor easier to observe
}
`
I can see on the serial this :
If you can see, this is how I Have connected my ADXL362 :
Can you help me please ??!!
Thanks a lot
The text was updated successfully, but these errors were encountered:
Hello, I try to connect my ADXL362 with my ARDUINO Mega 2560 on SPI.
I've connected the ADXL362 trough a Logic Level Shifter, 4-Channel, Bidirectional to the Arduino and when I try the SampleRead code, I can just see the XValue. YValue, ZValue and temperature still stay at "-1".
My code is :
`/*
ADXL362_SimpleRead.ino - Simple XYZ axis reading example
for Analog Devices ADXL362 - Micropower 3-axis accelerometer
go to http://www.analog.com/ADXL362 for datasheet
License: CC BY-SA 3.0: Creative Commons Share-alike 3.0. Feel free
to use and abuse this code however you'd like. If you find it useful
please attribute, and SHARE-ALIKE!
Created June 2012
by Anne Mahaffey - hosted on http://annem.github.com/ADXL362
Modified May 2013
by Jonathan Ruiz de Garibay
Connect SCLK, MISO, MOSI, and CSB of ADXL362 to
SCLK, MISO, MOSI, and DP 10 of Arduino
(check http://arduino.cc/en/Reference/SPI for details)
*/
#include <SPI.h>
#include <ADXL362.h>
ADXL362 xl;
int16_t temp;
int16_t XValue, YValue, ZValue, Temperature;
void setup(){
Serial.begin(9600);
xl.begin(53); // Setup SPI protocol, issue device soft reset
xl.beginMeasure(); // Switch ADXL362 to measure mode
Serial.println("Start Demo: Simple Read");
}
void loop(){
// read all three axis in burst to ensure all measurements correspond to same sample time
xl.readXYZTData(XValue, YValue, ZValue, Temperature);
Serial.print("XVALUE=");
Serial.print(XValue);
Serial.print("\tYVALUE=");
Serial.print(YValue);
Serial.print("\tZVALUE=");
Serial.print(ZValue);
Serial.print("\tTEMPERATURE=");
Serial.println(Temperature);
delay(100); // Arbitrary delay to make serial monitor easier to observe
}
`
I can see on the serial this :
If you can see, this is how I Have connected my ADXL362 :

Can you help me please ??!!
Thanks a lot
The text was updated successfully, but these errors were encountered: