any one willing to write a program that works with the uno and the new sparkfun LSM303DLH breakout board so we can contol a rc servo
all i wanted to do was have the servo point in the direction the break out board was aimed
i saw the sparkfun video Chris did in 2012
we have tried and tried i was told it might be an issue with the breakout board we are using
our lsm303dlh is connected to the vcc-5v, grd-grd, scl-a5, and sda-a4 on the UNO
we have no communications or any life
tried the examples from Pololu web site just to test the breakout board and the device did not respond to movement or calibration
suggestions?
Here is the code for the I2C scanner by Nick Gammon. Running this will confirm that the sensor is on the bus and will give you the sensor address if the sensor is found. Make sure the baud rate matches in Serial monitor.
#include <Wire.h>
void setup() {
Serial.begin (115200);
// Leonardo: wait for serial port to connect
while (!Serial)
{
}
Serial.println ();
Serial.println ("I2C scanner. Scanning ...");
byte count = 0;
Wire.begin();
for (byte i = 1; i < 120; i++)
{
Wire.beginTransmission (i);
if (Wire.endTransmission () == 0)
{
Serial.print ("Found address: ");
Serial.print (i, DEC);
Serial.print (" (0x");
Serial.print (i, HEX);
Serial.println (")");
count++;
delay (1); // maybe unneeded?
} // end of good response
} // end of for loop
Serial.println ("Done.");
Serial.print ("Found ");
Serial.print (count, DEC);
Serial.println (" device(s).");
} // end of setup
void loop() {}
ran the 12c code it confirmed that the device was found
I tried the POLOlu examples and the adafruit i get a error code now on line
" void Adafruit_LSM303_Accel_Unified::write8(byte address, byte reg, byte value)"
error 'Adafruit_LSM303_Accel_Unified' has not been declared
what am i missing
what am i missing
The proper library installed in the proper place. Since, you've said nothing about what libraries you have downloaded, or where you have installed them, you're on your own.