} void loop() { //leer los valores e imprimirlos Wire.beginTransmission(ADXL345); Wire.write(0x32); Wire.endTransmission(false); Wire.requestFrom(ADXL345, 6 ,true); x =getWireRead(); y =getWireRead(); z =getWireRead(); Serial.println(" X : " + x + "g Y : " + y + "g Z : " + z + " g " ); delay(100); }
float getWireRead(){ float value = ( Wire.read () | Wire.read()
There are different versions of the module out there. It seems like the most common ones don't have a level shifter which means the IO lines should be limited to 3.3V. So a direct connection to a 5V Arduino might not be the best idea.
Saaaaaay whaaat!!! He's alive!!!
#include
int ADXL345=0x53;
String x,y,z;
void setup()
{
Serial.begin(9600);
Serial.println("Iniciar");
Serial.println();
Wire.begin() ;
}
void loop()
{
//leer los valores e imprimirlos
Wire.beginTransmission(ADXL345);
Wire.write(0x32);
Wire.endTransmission(false);
Wire.requestFrom(ADXL345, 6 ,true);
x =getWireRead();
y =getWireRead();
z =getWireRead();
Serial.println(" X : " + x + "g Y : " + y + "g Z : " + z + " g " );
delay(100);
}
float getWireRead(){
float value = ( Wire.read () | Wire.read()
There are different versions of the module out there. It seems like the most common ones don't have a level shifter which means the IO lines should be limited to 3.3V. So a direct connection to a 5V Arduino might not be the best idea.
Can you please provide this code?
but can i use for positional tracking
Hello, sir. If we want the reading only for the Y axis, what is the form of the coding, sir?
Will you ever do a face reveal?