[Avrora] How to implement a temperature sensor?

Benjamin Titzer titzer at CS.UCLA.EDU
Mon Aug 27 13:27:47 PDT 2007


You need to look at the constructor code in the LightSensor. It uses the 
names of the pins to figure out where it connects to the MCU. Internally 
there is an API for connecting pins and ADC inputs. The light sensor code 
should be pretty straightforward for explaining this.

-B

======================================================
Imagination is more important than knowledge.
-- Albert Einstein

On Tue, 28 Aug 2007, Zhifeng Lai wrote:

> Dear all,
>
> It seems that Avrora does not implement a temperature sensor, I therefore
> want to create it using the LightSensor template and add it to the mica2
> platform. Could you tell me how to correctly connect it to the
> microcontroller. In particular, I want to understand the meaning of this
> statement
>
>    lightSensor = new LightSensor(amcu, 1, "PC2", "PE5");
>
> in "avrora.sim.platform.Mica2.addDevices" method. Many thanks!
>
> Best regards,
>
> Yours sincerely,
> Zhifeng Lai
>
>
>
>
>


More information about the Avrora mailing list