Go Down

Topic: Arduino PROCESSING/GOBETWINO! (Read 460 times) previous topic - next topic

varuninnz

Hi there lovely people, I am in desperate need of advice here. THIS IS MY FIRST POST SO GO EASY!

Basically I've hacked into a weighing scale. When I run the serial monitor on arduino I ask the user to put the in the price, pallet wieght, and weight of 1 item. Then program then displays the values whatever the user has typed and PRESS R TO RESET THE PROGRAM . After this the programs keep looping and displays the number of items currently placed on the scale, total stock value, and the orignal weight.
What do I want:
1. I want to save the data while its looping continuously until the user has pressed R to reset the program.
2. Next while its looping I want to make a real time monitoring graph of Items VS time on the side until the R button has been pressed. Im quite new to processing, I know how to do this if the program is continously firing data in the serial monitor. But my case is different as you have to wait for the user to type in the values and then the vales are displayed and then the loop beings. Also you have 3 differnt values coming in, Stock Value, Orignal weight, Items placed.
3. Is there anyway to control the serial monitor in processsing console, instead of using arduino serial monitor. This would be really help as I can directly get the user to enter values, and then control my real time graph  and saving data when the user press R for RESET.

Below is how it looks when I run the serial monitor on arduino:
Please type the price for 1 product item WITHOUT THE $ sign and press ENTER - 10
Please type the weight of the pallet and press ENTER - 0
Please type the weight of the product and press ENTER - 1

The total weight of the product is -36.90
Price of the product per item you entered $10.00
The total price of the product is $-368.97
The pallet weight you entered is 0.00
The orignal weight is -36.90
The product weight you entered for one item is 1.00
The total number of items placed on the scale are -36

PRESS R TO RESET THE PROGRAM
Orignal weight: -36.90 Grams      Items placed: -36.90      Stock Value: $-368.97     
Orignal weight: -36.90 Grams      Items placed: -36.90      Stock Value: $-368.97     
Orignal weight: -36.90 Grams      Items placed: -36.90      Stock Value: $-368.97     
     
(After the press the R button) -- THIS LINE IS NOT IN SERIAL MONITOR
Please type the price for 1 product item WITHOUT THE $ sign and press ENTER - 10
Please type the weight of the pallet and press ENTER - 0
Please type the weight of the product and press ENTER - 1

The total weight of the product is -36.90
Price of the product per item you entered $10.00
The total price of the product is $-368.97
The pallet weight you entered is 0.00
The orignal weight is -36.90
The product weight you entered for one item is 1.00
The total number of items placed on the scale are -36

PRESS R TO RESET THE PROGRAM
Orignal weight: -36.90 Grams      Items placed: -36.90      Stock Value: $-368.97     
Orignal weight: -36.90 Grams      Items placed: -36.90      Stock Value: $-368.97 





PaulS

Quote
THIS IS MY FIRST POST SO GO EASY!

Quit shouting. We may be a bunch of grumpy old men, but we aren't deaf.

Quote
When I run the serial monitor on arduino I ask the user to put the in the price, pallet wieght, and weight of 1 item.

And the code for this looks like?

Quote
1. I want to save the data while its looping continuously

Save it where?

Quote
until the user has pressed R to reset the program.

And, what exactly does the Arduino DO when it gets an 'R'?

Quote
2. Next while its looping I want to make a real time monitoring graph of Items VS time on the side until the R button has been pressed.

So, 'R' is to be a toggle? Weigh -> Graph -> Weigh -> Graph?

Quote
Im quite new to processing, I know how to do this if the program is continously firing data in the serial monitor

Psst. The Processing forum is down the road a ways.

If you are running Processing, the Serial Monitor can not be running (on Windows, anyway), so the Arduino isn't "continously firing data in the serial monitor".

How can you make a "real time graph" if you aren't getting real time data?

Quote
But my case is different as you have to wait for the user to type in the values and then the vales are displayed and then the loop beings.

I don't have to wait for your user to do anything. I don't understand how the "loop beings".

Quote
Also you have 3 differnt values coming in, Stock Value, Orignal weight, Items placed.

Which of these values do you want to store and later graph?

Quote
3. Is there anyway to control the serial monitor in processsing console

Absolutely none at all, since they can't be running at the same time.

Of course, I think you are using "serial monitor" where you mean "serial port", since the Serial Monitor is an application that listens to and talks to the serial port. It's just a happy fact that the Arduino is on the other end of the serial port.


dxw00d

Quote
We may be a bunch of grumpy old men, but we aren't deaf.

I'm not old.

PaulS


Quote
We may be a bunch of grumpy old men, but we aren't deaf.

I'm not old.

I did say may...

Go Up