temperature: added C sources and removed grove dependency

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Mihai Tudor Panu
2016-09-09 18:33:30 -07:00
committed by Noel Eck
parent af61f51e48
commit 67d01a9393
16 changed files with 472 additions and 10 deletions

View File

@ -90,7 +90,7 @@ add_example (hmc5883l)
add_example (groveled)
add_example (groverelay)
add_example (light)
add_example (grovetemp)
add_example (temperature)
add_example (grovebutton)
add_example (groverotary)
add_example (slide)

View File

@ -34,7 +34,7 @@ main(int argc, char **argv)
//! [Interesting]
// Create the temperature sensor object using AIO pin 0
upm::GroveTemp* temp = new upm::GroveTemp(0);
upm::Temperature* temp = new upm::Temperature(0);
std::cout << temp->name() << std::endl;
// Read the temperature ten times, printing both the Celsius and

View File

@ -51,7 +51,7 @@ add_example(GroveRotarySample grove)
add_example(GROVESCAMSample grovescam)
add_example(SlideSample grove)
add_example(GroveSpeakerSample grovespeaker)
add_example(GroveTempSample grove)
add_example(TemperatureSample temperature)
add_example(VDivSample vdiv)
add_example(GroveWaterSample grovewater)
add_example(GroveWFSSample grovewfs)

View File

@ -22,10 +22,10 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
public class GroveTempSample {
public class TemperatureSample {
public static void main (String args[]) throws InterruptedException {
//! [Interesting]
upm_grove.GroveTemp temp = new upm_grove.GroveTemp(3);
upm_temperature.Temperature temp = new upm_temperature.Temperature(3);
for (int i = 0; i < 10; ++i) {

View File

@ -22,11 +22,11 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// Load Grove module
var groveSensor = require('jsupm_grove');
// Load temperature module
var upm = require('jsupm_temperature');
// Create the temperature sensor object using AIO pin 0
var temp = new groveSensor.GroveTemp(0);
var temp = new upm.Temperature(0);
console.log(temp.name());
// Read the temperature ten times, printing both the Celsius and

View File

@ -22,10 +22,10 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import time
import pyupm_grove as grove
import pyupm_temperature as upm
# Create the temperature sensor object using AIO pin 0
temp = grove.GroveTemp(0)
temp = upm.Temperature(0)
print temp.name()
# Read the temperature ten times, printing both the Celsius and