We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi All! For a University assignment I want to connect a particle sensor to an Arduino. The specific sensor is a Grove Dust Sensor (Seeedstudio), 5V and PWM output. I want to visualize the measured data in processing a bit like a wave, moving over the screen, over a specific amount of time. The more particles measured, the higher the wave will be. If this is overly difficult, or another way of visualization is preferred, I am open to suggestions. I am learning processing and Arduino (basics) so I thought this would be an interesting way to practice.
Answers
I am looking for some help to get started, maybe some suggestions regarding tutorials or some key advice on where to look
Once it reaches the far right do you want the scanline to wrap around to the left? Or do you want the new graph data insertion point to stay at the far right, and past data flows off to the left?
I'd suggest separating this into two parts -- the data collection part, and the display part.
You can prototype the display using fake data -- for example a simple sine wave:
Now write your display sketch as if this data was coming from the Arduino -- collect the data on a list or array for redrawing the whole graph history, or don't store past values and instead progressively overwrite the screen with a new columns of pixels.
When it is correctly displaying your sine wave, then change the value to coming from your Arduino setup -- you can iron out network communication or calibration issues while knowing that the display works correctly.
If you wish to use a library for your display, try grafica.
Thanks for the advice! I will get cracking at it.
Regarding the data, it is fine if it flow off the left side
For the display, if you are interested in using a library instead of writing your own you also might want to consider grafica:
Check the post on Feb 27 on this link: https://forum.processing.org/two/discussion/comment/88886#Comment_88886
Another suggestion showing Arduino and Processing code: https://forum.processing.org/two/discussion/18922/urgent-in-need-of-help-with-processing-code-srf10-ultrasonic-sensor/p1
Kf
Thanks a lot guys! I have been trying several things over the weekend and the results are certainly getting where I want them to be. So far so good:)
Great to see how quickly and in depth people respond to questions on this forum