Hello, Not entirely sure if I can help with Mica, but my group went through the same problem with TelosB motes and I can at least walk you through how we solved it. You can reconfigure DemoSensor to read different ADC channels like this:
If you use DemoSensorC and follow the interfaces down the chain, you'll notice that DemoSensorC uses VoltageC (/opt/tinyos-2.x/tos/platforms/mica) to read the internal voltage of the mote. VoltageC references VoltageP, which tells Atm128AdcConfig (/opt/tinyos-2.x/tos/chips/atm128/adc) which ADC channel to read. In this case, VoltageP is returning "ATM128_ADC_SNGL_1_23" for the Atm128AdcConfig.getChannel() command. If you want to read another ADC channel, you can simply copy VoltageP and rename it, also renaming it in VoltageC, then change that value to one of the options found in the Atm128Adc.h header. For ADC6, you should change that to "ATM128_ADC_SNGL_ADC6". I'm not entirely sure the folders are correct for your chipset, but it should work. It's kind of a pain to sift through all of the nested functions to get to that point, though. Hope this helps, Ryan Paulson Hello, How can i read the ADC6 channel (Voltage Readings) of a mica2 mote? I only found a DemoSensor!? http://www.tinyos.net/dist-2.0.0/tinyos-2.x/doc/html/tutorial/lesson5.html What can I use to read the ADC6, how to configure that, are there some sample programs? Thank you. Regards, Gerald -- NEU: FreePhone - kostenlos mobil telefonieren und surfen! Jetzt informieren: http://www.gmx.net/de/go/freephone
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
