Hello Guys,
This week's blog is here, so started working on IMU and Light sensors.
I had a few issues with the Sensors booster pack BMI160 and the Energia, I'm still working on it but for now I'm using a MPU6050. Well its a I2C accelerometer and gyroscope.
You can get the library and the examples over here, this guy has done a great job. You might get a few warnings when compiling the free fall example in Energia IDE. Just open the MPU6050.cpp file and remove ';' on the #endif statements.
I just made small modification to the Freefall example in the loop section. Just to display a message when I drop the breadboard 
void loop()
{
Vector rawAccel = mpu.readRawAccel();
Activites act = mpu.readActivites();
if(act.isFreeFall)
{
Serial.print("Madness is like gravity...all it takes is a little push");
Serial.print("\n");
}
}
The connections are straight forward,
SCL-->SCL
SDA-->SDA
VIN-->3V3
GND-->GND
and for the optical sensor I'm using the OPT3001 itself, but from a separate breakout board. connections are same as for the MPU6050.
and here we go, fluorescent light was about some 6ft away from the sensor.
The code? Well i used the opt3001 demo code in the energia IDE
.





Top Comments