It seems that the Prop Shield does not work with a Maple Mini.
I connected just 4 wires (+3.3V to +3.3V, GND to GND, SCL to SDL, SDA to SDA) and run a very simple sketch:
#include <Wire.h>
uint8_t addr = 0x60, reg = 0x0C;
void setup()
{
Serial.begin(115200);
Wire.begin();
}
void loop()
{
uint8_t b;
Wire.beginTransmission(addr);
Wire.write((uint8_t) reg);
if((b = Wire.endTransmission()) != 0)
{
Serial.print("endTransmission error = ");
Serial.println(b, HEX);
return;
}
Wire.beginTransmission(addr);
if(!Wire.requestFrom(addr, (uint8_t) 1))
{
Serial.println("requestFrom error");
return;
}
if(Wire.available() != 1)
{
Serial.println("no data available");
return;
}
Serial.print("Who am I = ");
Serial.println(Wire.read(), HEX);
delay(1000);
}
The result is "Who am I = 0". All registers that I try to read result in a zero value. It is the same with all sensors on the Prop Shield (FXOS8700, FXAS21002, MPL3115).
I connected some other sensor boards (L3G4200, BMP180) to the Maple and ran the same sketch (with fitting addresses and registers) and it works. On the other hand I also wired the Prop Shield in the same way to an Arduino Nano and this works as well. Only the combination Maple Mini - Prop Shield does not work. Whereby the hardware connection seems to be OK, otherwise the endTransmission command would return an error. Since this is part of a bigger project, I rely somehow on the Maple and cannot switch easily to a Teensy.
Any suggestions? Thanks in advance.
I connected just 4 wires (+3.3V to +3.3V, GND to GND, SCL to SDL, SDA to SDA) and run a very simple sketch:
#include <Wire.h>
uint8_t addr = 0x60, reg = 0x0C;
void setup()
{
Serial.begin(115200);
Wire.begin();
}
void loop()
{
uint8_t b;
Wire.beginTransmission(addr);
Wire.write((uint8_t) reg);
if((b = Wire.endTransmission()) != 0)
{
Serial.print("endTransmission error = ");
Serial.println(b, HEX);
return;
}
Wire.beginTransmission(addr);
if(!Wire.requestFrom(addr, (uint8_t) 1))
{
Serial.println("requestFrom error");
return;
}
if(Wire.available() != 1)
{
Serial.println("no data available");
return;
}
Serial.print("Who am I = ");
Serial.println(Wire.read(), HEX);
delay(1000);
}
The result is "Who am I = 0". All registers that I try to read result in a zero value. It is the same with all sensors on the Prop Shield (FXOS8700, FXAS21002, MPL3115).
I connected some other sensor boards (L3G4200, BMP180) to the Maple and ran the same sketch (with fitting addresses and registers) and it works. On the other hand I also wired the Prop Shield in the same way to an Arduino Nano and this works as well. Only the combination Maple Mini - Prop Shield does not work. Whereby the hardware connection seems to be OK, otherwise the endTransmission command would return an error. Since this is part of a bigger project, I rely somehow on the Maple and cannot switch easily to a Teensy.
Any suggestions? Thanks in advance.