I2C issues with MS5803-14BA Breakout [SOLVED]

This is probably something really silly, but…

I’ve been playing with a new pressure sensor from SparkFun the MS5803 ( https://www.sparkfun.com/products/12909 ) breakout.

I have this working on an Arduino Uno using this library ( https://github.com/millerlp/MS5803_14 ) and have tried to use it on the Spark (with a couple of modifications, namely change D1 and D2 references to Z1 and Z2 to get around naming conflicts) but I just can’t get the Spark to talk to the sensor.

The sparkfun board has pull up resistors on it, and I’ve also tried with external 10k pull up resistors. Regardless of what I do the Wire.endTransmission(); call always returns a 4 (other error).

Something such as resetting the sensor:

Wire.beginTransmission( MS5803_I2C_ADDRESS );
Wire.write( CMD_RESET );

where the address and reset are defined as

#define MS5803_I2C_ADDRESS    0x76
#define CMD_RESET		0x1E

I’m sure I’m missing something simple, but it’s late and my brain stopped working a while ago so any advice / things to test would be greatly appreciated.

Just to spare others to ask stupid questions :wink:

Can you give us your hookup details, please?

I took everything apart this morning put it on breadboard and simplified the set up with out any success - at the moment it is set up as:

Spark core powered via USB - 5v

Spark 3v3 -> MS5803 break out 3v3
Spark GND -> MS5803 break out GND
Spark D0 / SDA -> MS5803 break out SDA
Spark D1 / SCL -> MS5803 break out SCL

Spark D0 and D1 pulled up to 3v3 with 4k7 resistors - that’s in addition to the pull ups on the break out board (just in case they weren’t working :slight_smile: )

My code now is literally the following - made a few “grasping at straws” changes based on other working libraries:

void setup() {


    delay( 2000 );

    reset( 0x76 );


void loop() {


void reset( uint8_t addr ) {
    Wire.beginTransmission( addr );
    Wire.write( (uint8_t) 0x1E );

The last Serial.println always returns 4 which is other error.

Ok, I stuck in the lines:


Near the top of the setup() function, so that they’re called before any library Wire.begin() calls and it now looks like I am getting results (well I’m getting data back anyway, and the “4” errors have stopped). Hopefully these lines won’t stop the other I2C sensors from operating, but I’ll be able to fully test that later.

1 Like

Sorry for necroposting but I’m hitting this same issue - wondering if the original author ever got this sorted out?

My new thread on this issue is here