From 07d921b08e4be475e737f34f5a334f7526128d8a Mon Sep 17 00:00:00 2001 From: "Enric M. Calvo" Date: Fri, 4 Mar 2011 15:54:21 +0100 Subject: [PATCH] Modified Makefile and test-potent.c for ICTPWSN --- examples/z1/Makefile | 2 +- examples/z1/test-potent.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/z1/Makefile b/examples/z1/Makefile index 27edd50ed..941441db1 100644 --- a/examples/z1/Makefile +++ b/examples/z1/Makefile @@ -3,7 +3,7 @@ TARGET=z1 endif CONTIKI_PROJECT = test-phidgets blink test-adxl345 tmp102-test test-battery test-sht11 #test-potent -CONTIKI_SOURCEFILES += cc2420-arch.c sensors.c sht11.c +CONTIKI_SOURCEFILES += cc2420-arch.c sensors.c sht11.c potentiometer-sensor.c PROJECT_SOURCEFILES = i2cmaster.c tmp102.c adxl345.c battery-sensor.c sky-sensors.c #potentiometer-sensor.c APPS=serial-shell diff --git a/examples/z1/test-potent.c b/examples/z1/test-potent.c index 5bf58abbe..9c0263c35 100644 --- a/examples/z1/test-potent.c +++ b/examples/z1/test-potent.c @@ -5,7 +5,7 @@ /*---------------------------------------------------------------------------*/ -PROCESS(aplicacio, "Aplicacio de prova"); +PROCESS(aplicacio, "Testing Potentiometer"); AUTOSTART_PROCESSES(&aplicacio); /*---------------------------------------------------------------------------*/ PROCESS_THREAD(aplicacio, ev, data) @@ -13,13 +13,14 @@ PROCESS_THREAD(aplicacio, ev, data) PROCESS_BEGIN(); - SENSORS_ACTIVATE(potentiometer_sensor); - + // INSERT LINE HERE TO ENABLE POTENTIOMETER + while (1) { - uint16_t v = potentiometer_sensor.value(0); - + uint16_t value + //INSERT LINE HERE TO READ POTENTIOMETER VALUE + printf("Potentiometer Value: %i\n", v); }