Difference between revisions of "Toggling a TelosB ADC Pin"
From Cyber-Physical Systems Laboratory
Jump to navigationJump to searchLine 15: | Line 15: | ||
TOSH_CLR_ADC3_PIN(); | TOSH_CLR_ADC3_PIN(); | ||
</pre> | </pre> | ||
+ | |||
+ | You can of course switch the ADC number, and maybe even replace it with GIO#. | ||
+ | |||
+ | == TinyOS 2.x == |
Revision as of 01:12, 22 September 2009
TinyOS 1.x
First do this in StdControl.init():
TOSH_MAKE_ADC3_OUTPUT();
To set the pin high:
TOSH_SET_ADC3_PIN();
To set the pin low:
TOSH_CLR_ADC3_PIN();
You can of course switch the ADC number, and maybe even replace it with GIO#.