I'm trying to recieve a serial.println back from pressing the Go button on a NXShield.
I was wondering what does NXShield.init( SH_HardwareI2C ); do?
Code:
#include <Wire.h>
#include <NXShield.h>
#include <PFMate.h>
NXShield NXShield;
PFMate PFMate;
void setup ()
{
char str[256];
Serial.begin(115200); // start serial for output
delay(500); // wait, allowing time to activate the serial monitor
Serial.println ("Press GO button to continue");
NXShield.waitForButtonPress(BTN_GO);
Serial.println ("Go pressed");
//
// Initialize the i2c sensors.
//
PFMate.init( &NXShield, SH_BBS2 );
}
void loop()
{
char aa[80];
char str[256];
int bb_us;
strcpy(aa, PFMate.getDeviceID() );
sprintf (str, "PFMate: DeviceID: %s", aa);
Serial.println(str);
strcpy(aa, PFMate.getVendorID() );
sprintf (str, "PFMate: VendorID: %s", aa);
Serial.println(str);
sprintf (str, "PFMate: loling: %d mm", bb_us );
Serial.println(str);
}
Serial Monitor Output:
Press GO button to continue
ERROR: Device-ID or Version mismatch. Device-ID: , Version: