Close

Accelerometer MicroPython demo

A project log for 2018 Open Hardware Summit badge

electronic conference badge for 2018 Open Hardware Summit attendees

oshparkoshpark 10/20/2018 at 16:080 Comments

Want to use the KX122-1037 Accelerometer (datasheet) on the 2018 Open Hardware Summit badge?

Step 1:

Make sure that R12 and R13 are populated.

IMG_20181004_202602 (1)

R12 and R13 are 2.2K Ohm resistors for the I2C bus.  This is needed for the accelerometer to work.  We mistakenly had DNP (do not place) on the BoM (Bill of Materials) for R12 and R13.

IMG_20181004_202414 (1)

Awesome people at Artisan’s Asylum makerspace helped to solder these resistors on the badges right before Open Hardware Summit✨

It is possible that some badges were not reworked.  Please email drew@oshpark.com if they are missing from your badge.

This photo shows what is will look like when R12 and R13 are missing:

IMG_20181004_213549

Step 2:

Download the Python file named accelerometer.py from the ohs18apps repository on GitHub:Screenshot from 2018-10-17 23-35-18.png

Start the FTP server and connect to the SSID listed on the badge:

https://photos.app.goo.gl/SKBWbUtKghszr9Ns5

https://photos.app.goo.gl/SKBWbUtKghszr9Ns5

Open your FTP client application and connect to 192.168.4.1: Screenshot from 2018-10-03 23-58-59

After the transfer completes, power cycle the badge by removing the batteries and reinserting.

Press the left application button (with the paintbrush and pencil icons) to enter the menu.  accelerometer.py should then be listed under Available Apps menu.  Press the down cursor until accelerometer.py is selected and then press the application button again.

IMG_20181016_083924

Step 3:

The KX122-1037 Accelerometer datasheet describes the 3 different axis:

Screenshot from 2018-10-17 21-25-45

Here are examples of the X, Y and Z axis of the accelerometer for reference:

X axis positive max

X axis negative max

Y axis positive max

Y axis negative max

Z axis positive max

Z axis negative max

Resources:

Discussions