I keep getting the "Void Value no Ignored as it ought to be" when trying to get raw accelerometer values to print on the lcd screen for only the X direction. Please help. I am a confuzzled student.
#include <Wire.h>
#include <Zumo32U4.h>
LSM303 compass;
L3G gyro;
char report[120];
void setup()
{
Wire.begin();
if (!compass.init())
{
//Failed to detect the compass.
ledRed(1);
while(1)
{
Serial.println(F("Failed to detect the compass."));
delay(100);
}
}
compass.enableDefault();
if (!gyro.init())
{
// Failed to detect the gyro.
ledRed(1);
while(1)
{
Serial.println(F("Failed to detect gyro."));
delay(100);
}
}
gyro.enableDefault();
}
int16_t compassCount = 0;
void loop()
{
compassCount = compass.read();
//gyroCount = gyro.read();
snprintf_P(report, sizeof(report),
//PSTR("A: %6d"),
compass.a.x, compass.a.y, compass.a.z,
compass.m.x, compass.m.y, compass.m.z,
gyro.g.x, gyro.g.y, gyro.g.z);
lcd.clear()
lcd.print(compassCount)
//Serial.println(report);
delay(100);
}