So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Luke Fold
#69525 Thanks for the hints above- most appreciated!

@rudy- would you suggest I could get the below example working with ESP8266 + 9dof Sensor stick (via I2C), or would I need the ESP Localiser custom board?

I'll go ahead and try your fork when I get a chance.

Re: project- yes I'm surprised how hard it is to get wireless IMU data- the IOS solution worked well and we had heaps of fun, but it's silly to have an ipod in a ball when all we want from it is the IMU data!

I'll post all progress here- including examples of how we finally get it working (I hope!), and links to documentation of final project (happening late October).

Thanks again for all the help- ESP community was the right place to come!
User avatar
By Luke Fold
#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.ino

It 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
User avatar
By rudy
#69620
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

SDA : 2
SCL : 14


OK I just saw this. The pin connections for the Localizer is using GPIO4 and GPIO5. If it is easy to change the connections to those pins then it should work. Use GPIO4 for SCL and GPIO5 for SDA.