I2C protocol

Hi, I want to get digital input from a pressure sensor to arduino on SDA and ScL lines. I am not able to get the address of the sensor. I tried a couple of codes to find the address and read digital input. please help. I am using arduino mega 2560. (SDA=pin20 and SCL=pin21)

And what is the sensor?
Links, please.
Code and schematic helpful too

Curious, did you get that other part working on the serial protocol?

a7

Did you run the 'i2c_scanner' sketch that comes with the IDE?

HI TheMemberFormerlyKnownAsAWOL, this is the link to the datasheet of the sensor. https://www.mouser.in/datasheet/2/187/honeywell-sensing-trustability-ssc-series-standard-1095240.pdf

Hi alto777, I am still working on serial comm as well. Both my sensors use different types of communication.

hi aarg, I ran the I2C scanner IDE code , It actually doesn't start scanning. When i Shake the Vin wire on the arduino, it will scan. Otherwise it wont scan. and after that even that stops happening. I dont know why?

If something like an example sketch only works when you shake the wires, you probably have bad wires/connections. You need to double-check all of the wiring first and make sure it is all good before you can even begin to try to figure out your code.

Either that or it is only running once on boot and then hanging, and your shaking of the wires is disconnecting/reconnecting the Vin causing a reboot. Do you have anything else in addition to the code in the example running or just the plain vanilla example?

Hi alto777, I am still working on serial comm as well. Both my sensors use different types of communication.

Cool. With any luck you’ll need also need a peripheral device that uses SPI.

Hat trick.

a7