Toggling an External Pin on the Imote2
From Cyber-Physical Systems Laboratory
Jump to navigationJump to searchSometimes toggling an external pin is useful when evaluating an Imote2. By toggling this pin at certain intervals, an oscilloscope can be used to measure the latency of an operation. The following instructions describe how to toggle pin 14 of interface J7 via the Leds.redOn and Leds.redOff interface.
Open the following file:
$TOSROOT/tos/platforms/imote2/hardware.h
One line 141, change 103 to be 94.
This maps the red LED control pin to be GPIO 94, which is exposed as pin 14 of J7 as shown on page 5 of Imote2 engineering manual.