Building up on the serial communications capability of the Arduino board, I used an accelerometer to control a dot in a Processing sketch. The x-value and the y-value captured from the accelerometer were mapped to the equivalent values of the screen.
Tag: arduino
-
Arduino Diaries III: Sensing Visualized
Serial sensor data can be sent through an Arduino board to a computer, where it can be further processed by Arduino’s own Wiring programming environment, or alternative software environments such as Processing.
Below are the results of such process for two different sensors. In both cases, the binary data received from the sensor was mapped to an appropriate range in Processing (0 to height of window), and graphed as a time-series.
The first sensor is a force sensor whose returned values had a nice, expansive range due to its nuanced responsiveness to applied force.
Compare this to the x-axis readings of an accelerometer, below.
The results are not as varied as those of the force sensor mainly because of the inclination of the accelerometer’s reading to be of a broad set of ranges that are difficult to map appropriately to the Processing’s sketch screen.
-
Arduino diaries II
The Arduino microcontroller receives a digital input from a switch, and accordingly outputs a digital signal that lights up an LED depending on the state of the switch.