Hi, how are you? Im having trouble trying to communicate an external sensor with the audiomoth using i2c protocol. I dont know what pins to use as SDA and SCL, and how to use them. Also, I cannot find the part in the code where you connect the sda to the particular output pin. Do you have any example or something as a guide? Besides the Alternative firmware and applications that are in this page. Thank you! I leave my mail just in case lucasdiazmiguez@gmail.com
top of page
To test this feature, visit your live site.
3 Comments
bottom of page
Hi Lucas, There is a hardware supported UART on the GPIO pins but no hardware supported I2C. As a way around this, you could implement I2C through bit-banging on any of the GPIO pins, or through a UART to I2C bridge such as this - https://www.nxp.com/docs/en/data-sheet/SC18IM704.pdf. We haven't tried either approach to date. There is a good example of I2C bit-banging here - https://calcium3000.wordpress.com/2016/08/19/i2c-bit-banging-tutorial-part-i/, It's for a different chip but the idea will be the same. Alex