Visually show beam in processing

in our final year project our wants us to show beam in processing software… i.e if we apply load on he beam in reality it will be visible in processing software also show us deformation recorded by strain guages …
can we do this in processing software ??? ???

1 Like

Absolutely you can!

Related post:

Starting doing some exploration.
There are lots of resources out there including this forum.

I may assist once you start doing some personal exploration on the subject.



we are doing final year project in which we are doing structural health monitoring by using strain guages. now being a civil engineer i am not capable of writing code in processing software to get data from ardunio with which strainguages are attached.
can u people help me to write code to recieve data from dtrain guages…

we will upload code of strain guage from arduino software to arduino chip and then want to receive output in processing software…
first of all we are doing it on small sacel using strain guage bf350 strain guage attached with steel rule… after gettting results…
then we wil perform it on large scale on real bridges…
so we need code of processing software to get data from these strain guages…
being a civil engineering student i am not familiar with java language… (coding)…
how could i start ???

1 Like

did u understood m problem>?


There are lots of resources out there and you need to take this one step at a time.

Start with Processing tutorials here:

I will not be providing code for your academic project.
I may assist once you start writing code and need assistance.



actually the problem is if you can not code processing you also can not code arduino…
because what my idea was to ask you if you can show
what the arduino is sending now
by run arduino IDE, use the monitor tool
and copy the lines the arduino is sending
here to the forum post.

when we see that lines we can give help what processing code to use.

also you need to give more ideas what you want to do with the (string ) lines
arduino sends.
because just for a datalogging like put the data to a file
you not need processing but can do too.

a graphic representation of a beam bending
would be nice show for classroom, but
would not fit to the bridge data collect???

a basic arduino processing intro i did here

1 Like

i am learning java language from youtube… but tommorow is our meeting and i have to show code… can u write a simple code of bf350 just to represent some data in tommorow’s meeting… further i m working on developing my skills in java i.e in processing by watching tutorials…

this is what we are doing tommorow … i want code in processing…

so you read A0 and print to USB port.

if you send all that nice long string line to processing
have a heavy job to use it.
just the raw number would be better

1 Like

I had a student come to me for help last year.

He had a working project after 2 months of work and was collecting data from sensors using Arduino and displaying on Arduino IDE monitor and plotter.

In the last 3 weeks of his project he came to me and asked how he can visualize the data; I suggested Processing.

I got him started and he learned to program with Processing independently and came to me for assistance and guidance as required.

I did not give him a single line of code; I did assist him with his code when he was stuck and guided him.

He did all the work.

This is your project.

I will not provide you with code.


1 Like

but i will show you something,
that is not the arduino processing connection,
as i link already to my tutorial,
but possibly that is a good moment for a processing teaser

// v02

FloatList qs = new FloatList();
int beamlong = 300;
float q;

void setup() {
  size(400, 200);
  println("Cantilever beam with uniformly distributed load\nuse mouseY");

void draw() {
  background(200, 200, 0);
  get_force(); //___________________________________ for now only mouseY / later USB Arduino loadcells
  draw_beam(); //___________________________________ show a bending beam ( as line by points )
  time_plot(); //___________________________________ draw a plot of the last 300 samples

void get_force() {
  q = map(mouseY, 0, height, 0.0, 1.0); //__________ operation mouseY for load
  qs.append(q); //__________________________________ remember on a array
  if ( qs.size() > beamlong ) qs.remove(0); //______ delete oldest as we use short plot only  
  text( nf(q*100.0, 0, 1)+"%", width-50, 30); //____ show in PCT too

void draw_beam() {
  rect(0, 0, 20, height); //________________________ wall left / beam fix point
  stroke(0, 200, 0);
  for ( int i = 0; i < beamlong; i++)  point( 20 + i, height/2 -w(i, beamlong, q));

void time_plot() {
  float zoom =30;
  stroke(200, 0, 0);
  for ( int i = 0; i < qs.size(); i++ ) line(20+i, height-3, 20+i, height-3-qs.get(i)*zoom);

//Cantilever beam with uniformly distributed load
 E is the elastic modulus and I is the second moment of area of the beam's cross-section
 L length
 w(x) = q * x**2 * ( 6 * L - 4 * L * x + x**2 ) / 24 * E * I

float w(float x, float L, float q) {
  float E = 1e10, I = 1; 
  float wx = q * sq(x) * ( 6*L - 4 * L * sq(x) ) / ( 24 * E * I );
  return wx;

so you have a show ( without online data for now )

1 Like


1 Like