SENO470 NOT WORKING with Arduino MEGA 2560 R3

userHead aahadpia 2023-06-07 11:10:45 440 Views1 Replies

 

When i copy and paste the code from DFRobot Website (https://wiki.dfrobot.com/SKU_SEN0465toSEN0476_Gravity_Gas_Sensor_Calibrated_I2C_UART for acquiring data in initiative mode, I receive the message “No devices” on my serial monitor.

 

I connected 

D/T on Smart Gas Sensor Terminal to A4 on Arduino Mega 2560 R3, 

C/R on Smart Gas Sensor Terminal to A5 on Arduino Mega 2560 R3, 

- (negative sign) on Smart Gas Sensor Terminal to GND on Arduino Mega 2560 R3, 

+ (positive sign) on Smart Gas Sensor Terminal to 5V on Arduino Mega 2560 R3.

 

Additionally, I set the DIP switch SEL on the Sensor to 0, A0 and A1 both to 0, to use I2C communication by default and then I copy and pasted the code for acquiring data in initiative mode.

 

However, I get message “No devices” on my serial monitor.

 

Below I pasted the image of the connection diagram from the DF robot website and Arduino MEGA 2560 R3 pinout diagram. The connection diagram is exactly the same, however, I am using Arduino MEGA 2560 R3.

 

2023-06-07 19:59:05

1. After switching the communication mode and changing the I2C address, the system needs to be powered off and on again.2. The blue wire of the sensor is connected to SCL, and the green wire of the sensor is connected to SDA.

In Arduino UNO, A4 and A5 are not only analog ports but also IIC. The pins defining IIC are different in MEGA2560.

 

MEGA2560 GPIO:

Arduino UNO GPIO:

userHeadPic jenna