Ok so I have a Duemilanove board, and i have been programming a bit , but I'm confused. Which of the programming environments should i use if i want the results to appear on my PC. I know i need to program in arduino environment for the hardware part, but if i want to get the results to display on pc, do i need to first make the uC program and burn it and then make a Processing interface that will interpret the firmware and display the results. thanks in advance for your answers.
do i need to first make the uC program and burn it and then make a Processing interface that will interpret the firmware and display the results
Basically yes. However the monitor part of the arduino environment will let you look at the data byte your arduino sketch sends.
great I was confused with all the info on the forums/books/websites.
So i would need to specify in Processing which firmware sketch to use and it will call that program and communicate with the uC right...
No :- processing just looks at what is coming in on the serial port. It doesn't know or care where it is coming from. It can't reference the arduino code in any way.
thank you i greatly appreciate it.
you are not limited to use Processing.
You could use any programming environment that has the ability to read from a serial port.
Processing is a good chice though, because it's in the "Arduino family" and it's free.
Why not use the serial.Print(value); to display the result?
eg:
void setup{
serial.Begin(9600); //Start serial coms at 9600 bps
}
int i = 1; //A number to square
void loop{
serial. Print(i*i); //Send "i" over the serial connection
i++; //Add 1 to i
}
To see the results, with you board plugged in, click the serial monitor button.
Hope this helps!