Error while trying to put 3 Sketches togheter

Hello dear all

I'm working on a project with the following parts:

  • Arduino uno(Beetle BLE)
  • BMI160 Dfrobot
  • MAXREFDES117
  • LM35 Dfrobot

Now I managed to get all sensors working with their sample programs however once I tried to put the sketches toghete I always face this error:

Arduino: 1.8.12 (Windows Store 1.8.33.0) (Windows 10), Board: "Arduino Uno"

C:\Users\Chmasch2\AppData\Local\Temp\ccMi9DFf.ltrans0.ltrans.o: In function `i2c_write':

sketch/SoftI2CMaster.h:458: undefined reference to `ass_i2c_delay_half'

sketch/SoftI2CMaster.h:458: undefined reference to `ass_i2c_wait_scl_high'

sketch/SoftI2CMaster.h:458: undefined reference to `ass_i2c_delay_half'

sketch/SoftI2CMaster.h:458: undefined reference to `ass_i2c_delay_half'

sketch/SoftI2CMaster.h:458: undefined reference to `ass_i2c_wait_scl_high'

sketch/SoftI2CMaster.h:458: undefined reference to `ass_i2c_delay_half'

C:\Users\Chmasch2\AppData\Local\Temp\ccMi9DFf.ltrans0.ltrans.o: In function `i2c_start(unsigned char) [clone .constprop.18]':

sketch/SoftI2CMaster.h:309: undefined reference to `ass_i2c_wait_scl_high'

sketch/SoftI2CMaster.h:309: undefined reference to `ass_i2c_delay_half'

sketch/SoftI2CMaster.h:309: undefined reference to `ass_i2c_write'

C:\Users\Chmasch2\AppData\Local\Temp\ccMi9DFf.ltrans0.ltrans.o: In function `ass_i2c_stop':

sketch/SoftI2CMaster.h:382: undefined reference to `ass_i2c_delay_half'

sketch/SoftI2CMaster.h:382: undefined reference to `ass_i2c_delay_half'

sketch/SoftI2CMaster.h:382: undefined reference to `ass_i2c_wait_scl_high'

sketch/SoftI2CMaster.h:382: undefined reference to `ass_i2c_delay_half'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I would be very thankfull if someone could help me. Attached you find a zip file with my project files and what I have done for now.

cheers,
Manuel

RD117_ARDUINO.zip (30.6 KB)

Please post your programs as .ino files as most people will be reluctant to download an unknown ZIP file

IMHO it would be a good idea to merge two programs first and get the merged version working and then merge the third file.

Before merging any of them make sure that there is no overlap in the Arduino resources used - for example two programs using the same I/O pin. If there is then change things in one of the separate files and make sure that works before continuing.

...R

Hi Robin

Thanks for the quick reply.

Oh okay yes I didn't do that because there are so many header files and stuff it would get a very long post.
Yes that's what I did The analog sensor works with both I2C sensors seperatly but once you put in the second I2C the error occurs.

Pins are all different if I didn't miss anything.

Cheers,
Manuel

Are all of the I2C addresses different ?

Yes. I have two I2C sensors(0x57 and 0x69) and one Analog. The error was because of an older version of the code provided by the company. But still I have a problem. I compiles fine but it won't output any data.