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

@ -44,7 +44,7 @@ add_example(GroveMDSample grovemd)
add_example(GroveMoistureSample grovemoisture)
add_example(GroveMQ3 gas)
add_example(GroveMQ9 gas)
add_example(GroveO2Example groveo2)
add_example(O2Example o2)
add_example(GroveQTouch at42qt1070)
add_example(GroveRelaySample grove)
add_example(GroveRotarySample grove)

View File

@ -22,15 +22,15 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import upm_groveo2.GroveO2;
import upm_o2.O2;
public class GroveO2Example {
public class O2Example {
public static void main(String[] args) {
// TODO Auto-generated method stub
//! [Interesting]
// Initializing the Grove O2 sensor on the A) analog pin
GroveO2 o2 = new GroveO2(0);
O2 o2 = new O2(0);
while(true){
System.out.println("The output voltage is: "+o2.voltageValue());