# Get data from the ST LIS2DH12 3-axis accelerometer

**URL:** <https://community.sparkfun.com/t/get-data-from-the-st-lis2dh12-3-axis-accelerometer/37228>\
**Category:** Development Boards\
**Tags:** edge\
**Created:** [July 7, 2019, 11:34pm UTC](https://community.sparkfun.com/t/get-data-from-the-st-lis2dh12-3-axis-accelerometer/37228 "2019-07-07T23:34:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wendywang](https://avatars.discourse-cdn.com/v4/letter/w/b38774/32.png) [@wendywang](https://community.sparkfun.com/u/wendywang)\
**Post date:** [July 7, 2019, 11:34pm UTC](https://community.sparkfun.com/t/get-data-from-the-st-lis2dh12-3-axis-accelerometer/37228/1 "2019-07-07T23:34:06Z")

</div>

Hi, everyone

I do not know if it is possible to get the data from accelerometer from the SparkFun Edge Development Board - Apollo3 Blue?

Since I do not find anything described the accelerometer.

---

<div class="post-metadata">

**Author:** ![liquid.soulder](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/liquid.soulder/32/6069_2.png) [@liquid.soulder](https://community.sparkfun.com/u/liquid.soulder)\
**Post date:** [July 8, 2019, 4:25pm UTC](https://community.sparkfun.com/t/get-data-from-the-st-lis2dh12-3-axis-accelerometer/37228/2 "2019-07-08T16:25:16Z")

</div>

Check out this tutorial:

[https://learn.sparkfun.com/tutorials/us … pollo3-sdk](https://learn.sparkfun.com/tutorials/using-sparkfun-edge-board-with-ambiq-apollo3-sdk)

Specifically Example1 Edge Test

[https://learn.sparkfun.com/tutorials/us … plications](https://learn.sparkfun.com/tutorials/using-sparkfun-edge-board-with-ambiq-apollo3-sdk/example-applications)

You may either follow the tutorial and use the AmbiqSuite SDK or you could use the example code from the SparkFun Edge BSP ([https://github.com/sparkfun/SparkFun\_Edge\_BSP](https://github.com/sparkfun/SparkFun_Edge_BSP)) example1\_edge\_test/tf\_accelerometer and make it work in Arduino.

---

<div class="post-metadata">

**Author:** ![wendywang](https://avatars.discourse-cdn.com/v4/letter/w/b38774/32.png) [@wendywang](https://community.sparkfun.com/u/wendywang)\
**Post date:** [July 9, 2019, 4:23pm UTC](https://community.sparkfun.com/t/get-data-from-the-st-lis2dh12-3-axis-accelerometer/37228/3 "2019-07-09T16:23:57Z")

</div>

Hi, I followed the tutorial [https://learn.sparkfun.com/tutorials/us … plications](https://learn.sparkfun.com/tutorials/using-sparkfun-edge-board-with-ambiq-apollo3-sdk/example-applications), and when I used make bootload there appears the errors:

sudo make bootload

…/…/…/…/…/tools/apollo3\_scripts/create\_cust\_image\_blob.py --bin bin/example1\_edge\_test.bin --load-address 0xC000 --magic-num 0xCB -o bin/main\_nonsecure\_ota --version 0x0

/bin/bash: …/…/…/…/…/tools/apollo3\_scripts/create\_cust\_image\_blob.py: Permission denied

make: \*\*\* [Makefile:193: wired\_update] Error 126

And I have renamed /tools/apollo3\_scripts/keys\_info0.py to /tools/apollo3\_scripts/keys\_info.py.

and change the permissions on bsp/tools/uart\_wired\_update\_sparkfun.py to 755.

The driver has changed since the board works well with the voice recognized tutorial.

I used Ubuntu 16.04 and AmbiqSuite-Rel2.0.0. And I also want to know that the serial port on Ubuntu is using ls /dev/tty\* or ls /dev/cu\*.

Thank you

---

<div class="post-metadata">

**Author:** ![liquid.soulder](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/liquid.soulder/32/6069_2.png) [@liquid.soulder](https://community.sparkfun.com/u/liquid.soulder)\
**Post date:** [July 9, 2019, 8:26pm UTC](https://community.sparkfun.com/t/get-data-from-the-st-lis2dh12-3-axis-accelerometer/37228/4 "2019-07-09T20:26:17Z")

</div>

Sorry you’re having trouble with the SDK. We are currently focusing most support on the Arduino core. In that spirit I created an example sketch and attached it as a .zip.

Use the SparkFun Apollo3 Arduino core and select “SparkFun Edge” as the board.

You can follow this tutorial to install the Arduino core:

[https://learn.sparkfun.com/tutorials/ar … th-arduino](https://learn.sparkfun.com/tutorials/artemis-development-with-arduino)

When did you get your Edge board? Is it from the TensorFlow Dev summit or from the preorder by SparkFun? There are discrepancies between the bootloaders on the two boards that might give you trouble. I am working on a fix for the Arduino core that will come out soon

[Edge\_Accelerometer\_Arduino.zip](https://community.sparkfun.com/uploads/short-url/yIRhHSD5hDwMwVQ47WkW9JNA4cV.zip) (16.2 KB)

---

<div class="post-metadata">

**Author:** ![liquid.soulder](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/liquid.soulder/32/6069_2.png) [@liquid.soulder](https://community.sparkfun.com/u/liquid.soulder)\
**Post date:** [July 10, 2019, 3:41pm UTC](https://community.sparkfun.com/t/get-data-from-the-st-lis2dh12-3-axis-accelerometer/37228/5 "2019-07-10T15:41:09Z")

</div>

I just released v1.0.2 of the Apollo3 Arduino Core - this allows you to easily select the baud rate for upload to the Edge board.

See attached screen capture showing where to make the selection.

 ![SBL_Baud_Rate_Selection_Edge.jpg](https://canada1.discourse-cdn.com/sparkfun/original/3X/d/1/d14c8a67eb36c1c8bcf1349b5fb210408566c653.jpeg)
