

#include "stdio.h"
#include <Wire.h>
#include <GloboSonda.h>
#define PIN_DHT22 16
#define TIMER_LOG 3000
//contect d1 -> scl d2->sda
SensorAcelerometro acele;
 unsigned long Timer=0;
 #define SDA_PIN 4
#define SCL_PIN 5
const int16_t I2C_MASTER = 0x42;
void setup() {

  Serial.begin(9600);
  Wire.begin(SDA_PIN, SCL_PIN); 
  acele.Init();
}

void loop() {
  
 if(!Utiles::isTime(&Timer,TIMER_LOG))
  return;


  Serial.print("aceleracion x: ");
 Serial.print(acele.GetAx());
 Serial.print(" aceleracion y: ");
 Serial.print(acele.GetAy());
 Serial.print(" aceleracion z: ");
 Serial.println(acele.GetAz());
 Serial.print("mag x: ");
 Serial.print(acele.GetMx());
 Serial.print(" mag y: ");
 Serial.print(acele.GetMy());
 Serial.print(" mag z: ");
 Serial.println(acele.GetMz());
 
}
