- Tue Aug 29, 2017 3:43 am
#69535
Okay- I've added the OSCmodule include to the Rudys UDP fork of ESPLocaliser- and it looks like I'm getting closer. this is the edit i've made:
void Udpsend() {
OSCMessage msg("/gyro");
msg.add(imu_gx);
Udp.beginPacket(RemoteUDP, RemoteUdpPort);
msg.send(Udp);
Udp.endPacket();
msg.empty();
delay(500);
}
This would give me just one part of the data (the X axis of the Gyro)- but it will do for testing. I am able to receive this message in Max/MSP- it comes through as '/gyro -0.' This would be exactly what I want if the data was populated.
My question now is is the problem with my code above, or is my pin mapping connection of the LSM9ds1 different from that used by the Localiser board, and if so where do I change that? my connection is as follows:
LSM9DS1 : ESP8266
GND : GND
3.3V : 3.3V
SDA : 2
SCL : 14
The above connection works when I use the example sketch here:
https://github.com/sparkfun/SparkFun_LS ... ic_I2C.inoIt looks like the addresses are the same tho:
Known working I2C with my hardware setup:
///////////////////////
// Example I2C Setup //
///////////////////////
// SDO_XM and SDO_G are both pulled high, so our addresses are:
#define LSM9DS1_M 0x1E // Would be 0x1C if SDO_M is LOW
#define LSM9DS1_AG 0x6B // Would be 0x6A if SDO_AG is LOW
Definitions in Localiser code:
/* I2C address */
#define LSM9DS1_M 0x1E // I2C 7-bit address for magnetometer
#define LSM9DS1_AG 0x6B // I2C 7-bit address for accelerometer/gyroscope
So I guess it's something else that is wrong?
Cheers!
Luke