diff --git a/examples/c/i2c_hmc5883l.c b/examples/c/i2c_hmc5883l.c index bd72964..21e4d25 100644 --- a/examples/c/i2c_hmc5883l.c +++ b/examples/c/i2c_hmc5883l.c @@ -123,7 +123,7 @@ main(void) } /* set slave address */ - mraa_i2c_address(i2c, HMC5883L_I2C_ADDR); + status = mraa_i2c_address(i2c, HMC5883L_I2C_ADDR); if (status != MRAA_SUCCESS) { goto err_exit; } diff --git a/examples/python/mcp3004.py b/examples/python/mcp3004.py index b941c49..84d2675 100644 --- a/examples/python/mcp3004.py +++ b/examples/python/mcp3004.py @@ -35,6 +35,6 @@ txbuf[2] = 0x00 while True: rxbuf = dev.write(txbuf) value = ((rxbuf[1] & 0x03) << 8) | rxbuf[2] - print value + print(value) time.sleep(0.5) diff --git a/examples/python/spi.py b/examples/python/spi.py index f8ee7ff..a867246 100644 --- a/examples/python/spi.py +++ b/examples/python/spi.py @@ -38,6 +38,5 @@ for x in range(0,100): rxbuf = dev.write(txbuf) if rxbuf != txbuf: print("We have an error captain!") - break exit(1)