Hi,
I'm trying to make Delta application to sample a signal using ADC
according to examples and applications for this purpose.
For this reason i changed the line
Impl.ADC->DemoSensorC to
Impl.ADC -> ADCC.ADC[TOS_ADC_ADC0_PORT];
Impl.ADCControl -> ADCC;
In order to set the port i include in the configuration Delta.nc the
adc0 file
icludes adc0;
The code is included below
includes adc0;
#include "Delta.h"
configuration Delta {
}
implementation {
components Main;
components MultiHop
, DeltaM as Impl
, TimerC
, LedsC
, ADCC
, DelugeC
;
Main.StdControl -> MultiHop;
Main.StdControl -> TimerC;
Main.StdControl -> ADCC;
Main.StdControl -> Impl;
// periodically sample a sensor
Impl.Timer -> TimerC.Timer[unique("Timer")];
Impl.TimerBlink -> TimerC.Timer[unique("Timer")];
Impl.ADC -> ADCC.ADC[TOS_ADC_ADC0_PORT];
Impl.ADCControl -> ADCC;
// send data messages
Impl.SendDeltaMsg -> MultiHop.Send[AM_DELTAMSG];
// monitor traffic being forwarded
Impl.SnoopDeltaMsg -> MultiHop.Intercept[AM_DELTAMSG];
// get statistics about current operation
Impl.RouteControl -> MultiHop;
Impl.RouteStatistics -> MultiHop;
// pretty LEDs
Impl.Leds -> LedsC;
}
The modifications in the DeltaM.nc are at the used interfaces where i
icluded the ADC,ADCControl
#include "Delta.h"
#include "circularQueue.h"
module DeltaM {
provides {
interface StdControl;
}
uses {
interface Send as SendDeltaMsg;
interface Intercept as SnoopDeltaMsg;
interface RouteControl;
interface RouteStatistics;
interface ADC;
interface ADCControl;
interface Timer;
interface Timer as TimerBlink;
interface Leds;
}
}
implementation {
I get the error message below when i make tmote but this is strange and
rather not possible to have an error in the .h file.
In file included from Delta.h:5,
from Delta.nc:2:
MultiHop.h:76: syntax error before `enum'
make: *** [exe0] Error 1
What else should i modify in oder to sample a signal from ADConverter
and use all the available functionality of Delta application.Of course
i've installed Boomerang.
Thank you
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help