The Oscilloscope tinyos application is wired to the DemoSensorC component which, if compiling for telosb, is in turn wired to the VoltageC component. To obtain readings from the microcontroller temperature sensor you should instead wire DemoSensorC to Msp430InternalTemperatureC.
Please note that your formula refers to readings from the INTERNAL temperature of the MSP430 microcontroller of the telosb, which is, obviusly, completely different from the environmental temperature. Do you what to monitor the microcontroller temp? Hope this can help, Raffaele 2009/5/22 bouzayani walid <bouzayaniwalid2...@yahoo.fr> > Thank you Sir, > > I will trying your solution. But I like knowing if the data given by this > project (oscilloscope in tinyos 1.1) is really the temperature of sensor. > > Thank you in advance > ______________________________ > BOUZAYANI Walid > Student Researcher > CES Laboratory, ENIS Tunisia > bouzayaniwalid2...@yahoo.fr > GSM: (00216) 94 306 603 > > ------------------------------ > *De :* Raffaele Gravina <raffaele.grav...@gmail.com> > *À :* bouzayani walid <bouzayaniwalid2...@yahoo.fr> > *Cc :* tinyos-help@millennium.berkeley.edu > *Envoyé le :* Vendredi, 22 Mai 2009, 1h44mn 18s > *Objet :* Re: [Tinyos-help] Data in java code > > Hi, > you could take the readings just before they are plotted in the > Oscilloscope.java class, at line 72: > "data.update(omsg.get_id(), omsg.get_count(), omsg.get_readings());" > > You can do something like this: > int[] processedReadings = computeMyFormula(omsg.get_readings()); > data.update(omsg.get_id(), omsg.get_count(), processedReadings); > > Note that your formula returns doubles but you'll need to use Math.round > and the downcasting to int the return value to put the rounded results of > the formula in your int array. > If you really need decimal precision you could multiply by > 10^(desired_precision) before rounding. > > Cheers, > Raffaele G. > > 2009/5/20 bouzayani walid <bouzayaniwalid2...@yahoo.fr> > >> >> Hi, >> >> I'm working on Telosb and Tinyos. >> In my project, I like adding a formula of conversion in my java code (of >> Oscilloscope). I wish insert a code (using the formula) to obtain >> a new value from data. >> >> This is my Formula: >> temperature = ((data/4096)*1.5 - 0.986)/0.00355 >> >> Where and how can I add it (in oscilloscope.java or GraphPanel.java). >> >> It's very important !! >> >> Thanks in advance >> ______________________________ >> BOUZAYANI Walid >> Student Researcher >> CES Laboratory, ENIS Tunisia >> bouzayaniwalid2...@yahoo.fr >> GSM: (00216) 94 306 603 >> >> >> _______________________________________________ >> Tinyos-help mailing list >> Tinyos-help@millennium.berkeley.edu >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > > > > -- > Raffaele Gravina > > Research Engineer > Wireless Sensor Networks Lab Berkeley > 2000 Hearst Ave, suite 304 > Berkeley, CA 94709 > +1 510 666 0174 ext. 101 > > -- Raffaele Gravina Research Engineer Wireless Sensor Networks Lab Berkeley 2000 Hearst Ave, suite 304 Berkeley, CA 94709 +1 510 666 0174 ext. 101
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help