Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By mariuszb
#12670
CHERTS wrote:
mariuszb wrote:BMP180 example:
In file i2c_bmp180.c should such a two change (in bold):

bool ICACHE_FLASH_ATTR BMP180_Init()
{

i2c_init(); // ----------------- should be added here
...
char temp[80]; //80 bytes buffer is too small for this prints -----------, eg. use 128 bytes


mariuszb you checked i2c_bmp180 example in dealing with real sensor? Can you give an example of a working i2c_bmp180?


Yes, I have BMP180. But its complicated because my program its mixture ESP12,ESP01 with DHT22,BMP180 and DS18B20.

Better just add i2c_init()
and increase this buffer temp[80] to temp[128].
If I find more , I will let You know.
(without init not works on eg. port12 and 13; if buffer is to small..You know what happens :D )

Ps. Did You read my previous post about httpclient.c - reconect problem???
User avatar
By mariuszb
#12672
CHERTS wrote:
mariuszb wrote:BMP180 example:
In file i2c_bmp180.c should such a two change (in bold):

bool ICACHE_FLASH_ATTR BMP180_Init()
{

i2c_init(); // ----------------- should be added here
...
char temp[80]; //80 bytes buffer is too small for this prints -----------, eg. use 128 bytes


mariuszb you checked i2c_bmp180 example in dealing with real sensor? Can you give an example of a working i2c_bmp180?



CHERTS This is this print example:
BMP180 read calibration data...
BMP180_Calibration:

AC1: 7835, AC2: -1100, AC3: -14030, AC4: 33186, AC5: 25472, AC6: 20540, B1: 6515, B2: 40, MB: -32768, MC: -11786, MD: 2532
and could be longer