Those lines should go in your app's config file. In general you can replace DemoSensor with anything that implements the ADC interface, e.g., the Hamamatsu PAR sensor. Some fiddling with the files and close reading of the nescc config docs should do the trick.
In T1 there are a series of Sense demo apps that do pretty much what you want, again using DemoSensor in order to obfuscate the actual operation. If you find an implementation of DS in one of the sensor board directories you will see that it basically changes the name of an ADC sensor channel and passes it through to the application level. MS lars vala wrote: > Hi everyone, > > I am new to tinyos, but have worked through the helpful tutorials at > http://docs.tinyos.net, and been reading both the tinyos manual and the > shorter nesc one. i'm understanding it slowly and steadily :) > > I want to implement a simple sensing program where one (telosb) mote > will take light-reading and transmit it to another, base (telosb)mote > connected serially to the PC. They would both blink for a successful > transmission. > > So as i see it my process involves understanding three pieces of tinyos > programming: > 1. taking readings, accessing the sensor, etc. > 2. transmitting data > 3. reading data on pc through the serial connection. > > I understand that the TEPs offer the specifications, like 109 for > sensors, but i don't have the grasp of nesc (yet!) to understand how to > apply it. > > I've been googling, searching these archives for some guidance. one post > contained this snippet: >> DemosensorC is not wired to photo sensor. I wired the Hamamatsu PAR > sensor to my application and now it works fine. >> HamamatsuC as Sensor; >> Main.StdControl -> Sensor; >> AlgoM.ADC -> Sensor.PAR; > > Context was insufficient for me to know how to apply this code, although > i understand that the photo-sensor on our telosb 2420s is the hamamatsu > s1087. Does this wiring go in the configuration module or the app > itself? Or if i am missing the plot completely, can anyone point me in > the right direction? > > Thank you! > > Lars > > > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
