Go Down

Topic: Changing variables using a PC program to ask questiond (Read 641 times) previous topic - next topic

SteveZZR

Hi guys,


I'm wondering how easy it would be for me to write a program (perhaps in VB?) that could re-write variables on a connected arduino, permanently (i.e. it asks for a number between 0 and 100 and saves it as 'speedA')

I've stumbled across this product
http://www.joejaworski.com/jebao/


I can't help but think after spending £50 on that, paying import duty etc. I could have spent a fraction and built one myself?



PaulS

Quote
I'm wondering how easy it would be for me to write a program (perhaps in VB?) that could re-write variables on a connected arduino, permanently (i.e. it asks for a number between 0 and 100 and saves it as 'speedA')
I'm wondering how easy it would be for me to build a house. Can you tell me?

The program could send something like "speedA = 3402854365<cr><lf>". The Arduino could read the serial port, and store the data it receives until the <cr> arrives. When the <cr> arrives, strtok() and atoi(), atof(), strtol(), etc. can be used to get the name ("speedA") and value (3402854365). Then, the name could be used to determine where to store the value.

Robin2

I'm wondering how easy it would be for me to write a program (perhaps in VB?) that could re-write variables on a connected arduino, permanently (i.e. it asks for a number between 0 and 100 and saves it as 'speedA')
Someone who knows how to program could certainly do this without difficulty. I have no idea whether you could as you have not given any information about your capabilities. If you are interested and willing to learn and work at it you should be able to do it.

It's not clear whether you mean to save the value on the PC or on the Arduino.
And how long do you mean when you say "permanently" - do you mean while the program is running, or do you mean that it is to be saved even when the computer/ arduino is switched off?

The demos here and here may be of interest - though they use Python rather the VB.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up