Memsic 2-axis

BlocklyProp reference for MEMSIC 2-AXIS blocks

 Propeller Activity Board WX, Propeller FLiP module, or Other board types. Propeller I/O pin availability will vary by board type. Not available for Badge or Scribbler Robot board types.

These blocks are for using the MEMSIC2125 Dual-Axis Accelerometer (#28017).

New to this sensor? Click here to see an example schematic and quick Blockly program to help you get started.

The PIN menu on all of the Memsic 2-Axis blocks can be set to “other.”  When “other” is chosen, the dropdown menu disappears, and it is replaced with an input.  You can then use any block that provides a numeric value such as a number value, get variable, or constant value block:


Memsic x acceleration

The Memsic x acceleration block returns the approximate acceleration measured by the Memsic sensor. Acceleration is measured in terms of g (acceleration due to earth’s gravity): a value of +/-1250 corresponds to approximately +/- 1 g.

Set the PIN dropdown to the Propeller I/O pin connected to the sensor’s Xout pin.


Memsic y acceleration

The Memsic y acceleration block returns the approximate acceleration measured by the Memsic sensor.  Acceleration is measured in terms of g (acceleration due to earth’s gravity): a value of +/-1250 corresponds to approximately +/- 1 g.

Set the PIN dropdown to the Propeller I/O pin connected to the sensor’s Yout pin.


Memsic rotation

The Memsic rotation block measures how much the sensor is rotated if it is held vertically (zero degrees is when the triangle on the Memsic sensor is pointed straight up. The sensor returns a measurement in degrees where 0 degrees is straight up, and 180 degrees is straight down.

Set the PIN dropdowns to the Propeller I/O pin connected to the sensor’s Xout and Yout pins.


Memsic x tilt

The Memsic x tilt block returns a measurement of how much the sensor has tilted in the x (sideways) direction when the top of the sensor is level with the ground.  The value returned is +/- 90 degrees.

Set the PIN dropdown to the Propeller I/O pin connected to the sensor’s Xout pin. 


Memsic y tilt

The Memsic y tilt block returns a measurement of how much the sensor has tilted in the x (front to back) direction when the top of the sensor is level with the ground. The value returned is +/- 90 degrees.

Set the PIN dropdown to the Propeller I/O pin connected to the sensor’s Yout pin.