mirror of
https://github.com/eclipse/upm.git
synced 2025-10-31 23:24:20 +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:
@@ -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)
|
||||
|
||||
@@ -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());
|
||||
Reference in New Issue
Block a user