mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
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:
@ -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)
|
||||
|
@ -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;
|
Reference in New Issue
Block a user