Accelerometers are used to measure the acceleration in three axes X, Y and Z. These devices are very handy when you want to measure how objects move.
MOD-SMB380 is UEXT module with digital SMB380 accelerometer from Bosch. as it have UEXT interface it’s easy to interface it to any board with UEXT, SMB380 supports both SPI and I2C interface, so the demo example can use both as both interfaces are present on UEXT connector.
Download the code from GitHub and build it: https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/iMX233/MOD-SMB380
# ./mod-smb380 -spi
switch to SPI reading
# ./mod-smb380 -i2c
switch to I2C reading