Closed stif closed 3 years ago
@stif ,
Thank you for the contribution !
I like and agree with your addition. I cannot test it for now, however i wish:
If would like to contribute more in collaborative way let me know I add you as commiter.
Not sure, if i merge this as-is i break size constraint, if i modularize (no time) can be merged.
Hello,
I have added conditional compiling based on preprocessor directive #ifdef _SENSOR_H
So for example if you only need the ds18b20 and the bh1750 Sensor you can comment out the unused sensors:
#include "ds18b20.h"
//#include "sht21.h"
//#include "si1145.h"
#include "bh1750.h"
//#include "bmp280.h"
//#include "bme280.h"
If i comment out the bmp280.h and include the bme280.h (swap bmp280 for bme280 - which i did in my last commit) the resulting main.hex is suitable for attiny85.
Cheers, Stefan
Hi @stif !
Sorry for the quite big delay (1 year !), managed your patch into.
With tiny minor cosmetics: https://github.com/cbalint13/tinnymodbus/commit/5b1e3b71b35a69f4989b76e1052f2cca09b05cd8 it is merged:
Thank you much for the contribution !
the bme280 sensor block is intended to replace the bmp280 Sensor block in main.c line 510-537:
// return I2C DEV VALUES if ( ( daddr >= 0x1230 ) && ( daddr <= 0x1231 ) ) {
Unfortunately the main.hex gets to big and overlaps with boot.hex so i had to comment out some other sensor parts as well in main.c in order to reduce size and to fit in the defined borders.Is it possible to move the location of the boot.hex? I am not too familiar with the assembler part..
I am working on arch linux with avr-gcc version 9.2.0 and even without any modification the main.hex overlaps with boot.hex
Other than that i want to thank you for sharing this great project! much appreciated!