This is an application illustrating a few basic examples on how to use the Common Sensor API along with sensor events and the Font support facilities in the ASF.
This example has been developed and tested on the XMEGA-A3BU Xplained evaluation kit with a Sensors Xplained Inertial 1 board (ATAVRSBIN1) fitted to the J1 and J2 expansion blocks.
Upon power up the example will initialize the monochrome display, system clocks, GPIO mapping, and interfaces to sensors on a Sensors Xplained board attached to the XMEGA-A3BU evaluation board.
The acceleration sensor and evaluation board are both put into low-power modes after an accelerometer low-g event is enabled to detect free fall. When the board is dropped, thereby generating a low-g state in Earth's gravitational field, the accelerometer generates an interrupt waking the MCU from sleep state.
Upon wake the application will collect a finite set of acceleration vector measurements and plot the results in a graph on the monochrome display after the user pushes the SW1
button on the evaluation board. The demo will be reset and ready to detect another low-g event when the user pushes the SW1
button a second time.
Relevant module dependencies for this application are:
This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.
For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/