The repo name speaks for itself. Use this code if you wish to collect MQ7 analog (non-discrete) Carbon Monoxide (CO) data and log to CSV files. Was tested recently and works, at least with an Arduino UNO r3 board. As specified and necessitated by the sensor, external calibration is required for absolute accuracy.
Collates code from FeifeiDeakin/MotionDataLogging: MotionDataLogging, Carbon_Monoxide_Gas_Sensor_MQ7___SKU_SEN0132_, Code Walkthrough | Adafruit Data Logger Shield | Adafruit Learning System and adafruit/Light-and-Temp-logger.
Original author: Niroshinie Fernando.
Licensed under GNU LGPL as necessitated by DFRobot (see this page for more info).
It is relatively simple to use. If you purchase an arduino board, all you have to do is just:
- download the Arduino integrated development environment (IDE) for free.
- Clone or release-download the code.
- Import it into the Arduino IDE as a new sketch.
- Use either the Arduino IDE Library Manager or manually install the following two libraries:
- The Adafruit Common Sensor Library; and
- The Adafruit Real-time Clock Library (RTCLib).
- Connect the Arduino board over USB and make sure that it is registered / assigned to the right COM ports in IDE > tools menu > COM Ports - possibly turn bluetooth off as well.
- Press Control+R to verify and compile the code.
- Finally press Control+U to transfer / upload the compiled program to the board. Should start working after that - check the upload out and serial moniter.
If you are allergic to graphical interfaces, or are sight-impaired and / or do not have the Java Access Bridge (JAB) – which is quite out-of-date anyway and will probably become increasingly unusable over the years – then you can always use the Arduino-CLI, the Arduino command-line interface (CLI). This simplifies the process even more, if you are used to text-based computer interaction. Also, NVDA is the only screen-reader that reliably works with the IDE, whereas JAWS crashes nearly every single time for some reason.