I'm doing a project using the ADXL335 accelerometer from SparkFun. The actual project I'm using P5 and it's working great. I'm running workshops in parallel and want to demo the chip in real-time but am currently out of time to build something from scratch. I'm desperate for a simple processing (or something else) sketch that takes my x, y, z values being printed to the serial port from Arduino and visualizes them in some way. Can anyone point me to anything that won't need a lot of coding time and effort just now?

Thank you! Claudia


After some quick searching I found an Instructable which uses your same sensor and plots the data thanks to a Python script.

You'll need to install Python if you want to replicate this project, but any programming language with a drawing library will work.

  • you can even grab the serial data and plot it with excel
    – Mark Omo
    Apr 26 '15 at 15:43
  • yup i've done that! it's just hard to understand what's happening if not in real-time. i am looking to give an audience a sense of what the sensor is doing while it's running. but great idea and thanks!
    – claudybee
    May 1 '15 at 16:25

A simple and fast solution would be implement a chart using a JavaScript library called Chart.js. it is simple and you can visualize your data in realtime.

Try node.js to make the back-end by communicating via serial (serialport package is good) and send the data using socket.io.

It is simple and you can set everything in less than 2 hours.


I recently made some video tutorials about this and you see them here. The audio is in Portuguese but you can just skip and go directly to coding sections.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.