CO2 sensor and SD card

userHead Raymond.Lines 2023-06-22 08:11:46 298 Views2 Replies

I have a Gravity: UART Infrared Carbon Dioxide Sensor (0-50000 ppm) and would like to use it with an arduino and a datalogger shield to save the C02 values to a SD card.  I am having trouble with the SD card and the sensor both being on the SPI bus.  Can you help me see how to widre the sensor and write the code for this?

2023-06-25 21:40:48

I'm assuming that you're using an Arduino. Here is a tutorial that shows how to use multiple SPI devices with an Arduino. This may help you: 

 

http://www.learningaboutelectronics.com/Articles/Multiple-SPI-devices-to-an-arduino-microcontroller.php

 

You can also think of an alternative. You can monitor the sensor using MQTT protocol:

 

https://www.pcbway.com/project/shareproject/CO2_Monitoring_System_d36aa302.html

userHeadPic bidrohini.bidrohini
2023-06-25 11:57:26

What board are you using? Could you pls upload the code and wiring diagram so we can get a better idea of the details?

userHeadPic jenna