October 12, 2016 at 4:46 pm #3660
We’ve just released the full KIT1 source code, and an upgraded server protocol that allows adding and reading additional sensors, including the highly acclaimed BME280. Read the press release here https://www.uradmonitor.com/open-source-uradmonitor-kit1/
This topic will offer assistance and guidance for compiling and modifying the uRADMonitor KIT1 firmware. Feel free to post your questions.October 13, 2016 at 9:20 am #3664SulleyParticipant
I successfully updated the firmware.
I compiled it on linux with only small changes (case sensitive fs, BME280.h vs bme280.h).
I tried to hook up my bme280 breakout board (from sparkfun, https://www.sparkfun.com/products/13676 ) but had some issues and would have a couple of questions.
1. #define BME280_ADDR (0x76<<1) //0x77 default I2C address
is this correct ? Since 0x76 << 1 is not 0x77
2. should SDA/SLC be pulled high?
3. After some debugging, it seems that the initial i2c communication breaks on the first try here:
if (i2c_start_wait(address | I2C_WRITE)) return I2C_ERROR;
in readmem() when it tries to read the ID from 0xd0.
This seems to be the first check that returns an error:
if((TWSR & 0xF8) != 0x08) return 1;
Any hints on what I might need to change ?
Thanks for the good work , cheers!October 13, 2016 at 5:49 pm #3673
The left shift is because we want the 7bit address. That is correct.
How is your BME280 connected?
“The 7-bit device address is 111011x. The 6 MSB bits are fixed. The last bit is changeable by SDO value and can be changed during operation. Connecting SDO to GND results in slave address 1110110 (0x76); connection it to VDDIO results in slave address 1110111 (0x77), which is the same as BMP280’s I2C address. The SDO pin cannot be left floating; if left floating, the I2C address will be undefined.” (BME280 datasheet)October 13, 2016 at 9:24 pm #3674SulleyParticipant
haha, well that was some time nicely wasted
my SDO was tied to Vcc , which i knew, and i knew i needed 0x77 as address,
that comment just threw me off
//0x77 default I2C address
thought it was already set as default and was confused with that shift
instead of trying the obvious, i went on and started debugging i2c communication
a habit of a reverse engineer i guess…
anyway, it’s working like a charm now, thanks!
Attachments:October 14, 2016 at 5:18 pm #3676
That is absolutely amazing! Congrats for being the first to manage to compile and use this new firmware (others are trying as we speak, but you were the first!)
Would you post a short tutorial on how you compiled the code and the BME280 configuration options?
The others would be so grateful!October 15, 2016 at 11:05 pm #3678wanekParticipant
@Sulley, could you please check it, that the temperature value on your display (and the device local site) it shows only integers or fractional numbers? my device shows only ints, also the local website and the graph on the server. i would like to know that it is a compilation error on my side, or there is a bug in the code. at the beginning i had some problems with floats while compiling.
i see that on the attached photo there is exactly (?) 25.0 degrees. however, chances are small for that…
- You must be logged in to reply to this topic.