Memsic 2125 Accelerometer

The Memsic 2125 accelerometer measures tilt in two dimensions. For more information about using this sensor with an Arduino see this page on the Arduino site..

Wire up the sensor as below. Plug the sensor into your breadboard across the center channel, the two sides of the breadboard are not connected to each other. The base pin on both sides connects to ground. The top right pin connects to the voltage, and the middle pins both connect to a digital input, one for each dimension.

The tilt value is read using a pulseIn function. The measured range for the input pulses is about 3800 to 6280 microseconds, which gets transformed to an Embrio activation of -1 to 1. If your hardware results in different measurements, change the values in the Every Update code block.

Note that this node alternates between reading the two pins, so each pin is read 16 times per second on a refresh rate of 32. This is done because doing two pulseIn calls in a row without a delay between them causes problems.

Supported Products

View discussion page on forum

To use this node in your Embrio project, either add it from the Library toolbar or copy the XML in the below box and paste it into a node screen.