Using Processing for creating a GUI to display Vibration Measurements from an Arduino (using the Grove SW-420 Vibration Sensor)

Hello everyone. I am creating a project, everything has gone perfect and the task is accomplished. I have fixed a Grove SW-420 vibration sensor and a Grove - LoRa Radio 433MHz Transmitter (acting as the client for sending) in one Arduino and the Grove - LoRa Radio 433MHz Receiver (acting as the server for reception) in the second arduino. When the vibration sensor records any vibration, the vibration measurement is immediately sent by the radio transmitter, to the radio receiver and the led on Pin13 of the 2nd Arduino lights up. I’m also able to get the vibration readings displayed on the serial monitor of the 2nd Arduino.
Now, being a learner with Processing and Java Programming, all that I want is to create a Graphical user interface on the Processing Platform, which can communicate with the 2nd arduino connected to my PC (to which the receiver is connected) and graphically represent the vibration readings through a graph. I also want the GUI to light up a virtual led (not on the Arduino board) on the monitor screen, as soon as a vibration measurement is encountered by the receiver.

Someone’s help and guide regarding this would be very beneficial for me. Please someone.
… Share your knowledge.

Just to be clear: what you are trying to do is to create a Java app that runs on your pc and displays Arduino data that you are currently reading with Serial Monitor in the Arduino IDE. Is this correct? ie no Android device involved. Not as a final solution, but have you used Arduino IDE’s Tools/Serial Plotter to see what a graph of your data would look like?

Yes, absolutely correct.
I also want the GUI to light up a virtual led on screen immediately when the Vibration is received by the radio receiver.

Yes, I just now used the serial plotter of the second arduino, to see how the graph looks like. But this is very unexpected and the graph is bizzare. And, this is how it looks like:


Whereas, I want a suitable and understandable graph in the GUI of Processing.

If you want to see my transmitter and receiver sketches, I could give them… Kindly assist me… Its urgent.

You’ll want to take a look at controlp5 or g4p which can be found in the processing app. If you click on tools > add tool then select libraries tab you’ll find them there. G4P comes with with a gui builder which can be accessed after install by going back into tools > G4P Builder.

1 Like

alternatively you can write your own gui classes, however this usually takes a fair bit of time. These are well established libraries they are both very well documented and G4P’s creator is active on this forum.

Wow… Is it @paulgoux sir?
Can I insert there whatever I want? Such as, if I want virtual LEDs and clear vibration sensor measurement graphs…

Unsure… those are just aimed at gui creation so windows, buttons, sliders, menus, events and clicks etc. You could try those and add this one which is aimed at data visualisation, and combine it with one of the above to get the effect you are looking for.

also here is a link to other libraries in processing which may be useful