AIR Project using an Arduino
- download final project code: Arduino Code
- download additional wiring_analog.c code: Wiring Code
- download processing code: Processing Code
- download C code: C
CODE FILE EXPLANATION:
- The final project code is the final arduino code for the project.
- The wiring_analog.c code should ONLY be used for KITS that USE the OZONE SENSOR. This code helps to reset the internal reference voltage of the atmega 8. We need to do that in order to get a higher resolution of the signal generated at the very low end of the voltage range. We will receive a low voltage signal from the Ozone sensor, since the PPM concentration for ozone is much lower than for CO. Rather than getting a number range from 0-1024 (the range we obtain from the analog to digital converter of the arduino/atmega8), between 0-5V, we now obtain that range between 0-2.5V. We could have set this reference voltage externally at the AREF pin of the arduino. However, this would have required and additional power source or voltage converter, so we did it in software instead.
- Before you program your Arduino, you have to replace the wiring_analog.c file in the Arduino ROOT DIRECTORY:
Arduino -> lib -> targets -> Arduino
MAKE SURE TO KEEP A COPY OF THE ORIGINAL FILE AS WELL!
- The processing code is used to download the data stored in the external eeprom onto your compute and store that data into a textfile. (sensor value + GPS information).
- The C code is used to convert the data stored in the textfile into KML files, the file format used by Google Earth. You need to pass 3 arguments before running this code:
- type in “0” if converting a file containing ozone data and “1” if converting a file containing CO data.
- provide the name of the input file (for example: “data.txt”)
- decide and provide a name for the output KML file. Choose a descriptive name, since your Google Earth will contain many different files that you might want to select individually.
- We did our best to diligently comment our code. We will go over the basic structure of the arduino, processing and wiring file as part of the workshop.
- The GPS is connected in same way as during our “GPS read” exercise.
- The yellow LED is the same as the one we used for “LED blink.”
- The three indicator LEDs are the same as used during the Variable Resistor Exercise.
- We have 2 additional LEDs. One green and one red. Those indicate the availability of EEPROM space. Green means space available, red means out of space. (connected to digital pins 7 & 8).
For more detail: AIR Project using an Arduino
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w