Xadow Tutorial - Acceleration Detector


We have made an acceleration detector, it detects the acceleration and reminds users by vibrating. When the acceleration changes, the Xadow Vibration will vibrate and the Oled will display the accelerometer value. You can also see the current battery voltage on the OLED display.

This demo required:

To complete the demo, you need to:

  • Connect Xadow Main Board,Xadow OLED, Xadow Vibrator and Xadow Accelerometer at the same direction with FFC cables.

  • Connect Xadow Main Board to PC with a Micro USB cable. Before uploading code, you need to install Xadow driver. Please click here to learn the specific operation.

  • When you see “Now, you can program and use the Xadow as you use other Arduino boards”, it means you have finished the preparations.

  • Downloading the file: acceleDetector Library and directly open acceleDetector INO file.


Before compiling, you should make sure that there are the library:OLED_Display12864 and sleep_FromArduino in Arduino Library. If not, please download them and put them on the libraries file of Arduino IDE in the path: ..\arduino-1.0.1\libraries after unzip._

  • Compile code and upload it to xadow board. You need to select Seeed Xadow from the Tools | Board menu of the Arduino environment.
  • Then you can see the following picture:

Change the acceleration value by shaking the sensor,you will see the sensor value on the OLED module


Demo1 acceleDetectoe Code

Help us make it better

Welcome to the new documentation system of Seeed Studio. We have made a lot of progress comparing to the old wiki system and will continue to improve it to make it more user friendly and helpful. The improvement can't be done without your kindly feedback. If you have any suggestions or findings, you are most welcome to submit the amended version as our contributor via Github or give us suggestions in the survey below, it would be more appreciated if you could leave your email so that we can reply to you. Happy Hacking!