o2: Added O2 sensor C source

Added the C source for the O2 sensor with necessary changes to cmake,
examples, docs.

    * Renamed all files with groveo2 to o2
    * Replaced all instances of groveo2 with o2
    * Added C source for o2 sensor
    * Updated all cmake files
    * Added C example for o2 sensor

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2016-09-07 10:18:06 -07:00
parent fe318a78d2
commit f9878b3fe6
19 changed files with 514 additions and 53 deletions

View File

@ -170,7 +170,7 @@ add_example (otp538u)
add_example (grovecollision)
add_example (groveelectromagnet)
add_example (groveemg)
add_example (groveo2)
add_example (o2)
add_example (grovegsr)
add_example (ina132)
add_example (l298)

View File

@ -24,7 +24,7 @@
#include <unistd.h>
#include <iostream>
#include <signal.h>
#include "groveo2.hpp"
#include "o2.hpp"
using namespace std;
@ -42,8 +42,8 @@ int main(int argc, char **argv)
//! [Interesting]
// The was tested with the O2 Oxygen Concentration Sensor Module
// Instantiate a GroveO2 on analog pin A0
upm::GroveO2 *O2 = new upm::GroveO2(0);
// Instantiate a O2 on analog pin A0
upm::O2 *O2 = new upm::O2(0);
while (shouldRun)
{
cout << "The output voltage is: " << O2->voltageValue() << "mV" << endl;