Wk 6 Serial To Processing! Barbara & Nadine!!

PART 1: Here is the simple code used to import the potentiometer readings into a graph like data in processing in Arduino and Processing. In the code we revised the input to remap the data to match to the window size.


PART 2: We used a digital input to read data from the Triple Axis Accelerometer Breakout – ADXL345, and a button to complete the Lab this week.

This accelerometer was different then the analog one we used in class. It required a bit more complex code in to complete basic functions of the breakout. The loop in the begining of my arduino code does the following: reads 6 register values from the ADXL345 using the readRegister function – reads the x, y and z acceleration values from the accelerometer and stores them in the buffer named “values” that was created in the beginning section of the sketch. When values are read from the accelerometer they are returned in bytes. They are linked together in a string and printed to the serial terminal. There is a 10ms delay before executing the loop again.

Here is a link to the code for Arduino and Processing.

Screen Shot 2014-10-12 at 1.02.21 AM Screen Shot 2014-10-12 at 1.01.12 AM


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s