Go Down

Topic: Interfacing Arduino from Procesisng detailed tutorial (Read 2452 times) previous topic - next topic

Abhik

I wrote a detailed tutorial on basic Arduino Processing communication at my blog at http://theblubot.blogspot.in/2013/10/interfacing-arduino-from-processing.html.

Hope it helps someone; comments regarding the blog would be appreciated.

Hrendor66

Thank you, that's a very helpful tutorial, but I DO see some room for improvements.

For instance, you show 'processing 2' pics, but I didn't see where you linked or mention to get Processing V2 libs for firmata as they are not included in the Processing V2 distro.

Also, I think adding comments indicating the codes purpose is important to keep arduino v processing code separated in my brain.

Other than that pedantic rant... great job.

I bet you forgot that was an additional step to install the firmata lib in processing... for that matter, that's where some Q's still are in my head. But many others were answered, and I bet I would stumble upon answers to my remaining Q's if I played with it a little.

Abhik

Quote
Also, I think adding comments indicating the codes purpose is important to keep arduino v processing code separated in my brain.

I've posted the whole code at https://gist.github.com/abhikpal/6822845. I avoided putting comments as each line of code was explained in the tutorial itself.

As for the Firmata installation problem; I will update the post soon.

Grumpy_Mike

You show an LED connected directly to the arduino pins with no current limiting resistor. This is bad and could damage your arduino. There is a myth that will not go away that pin 13 has a resistor in seriese with it. This has not been turn since 2007 but it still apperes in tutorials like yours.

Abhik

Quote
You show an LED connected directly to the arduino pins with no current limiting resistor.

The first version of this tutorial was written for the tutorial series of an Indian start up called Ardubotics (learn.ardubotics.com), the workshops that they organize use the Freeduino USB board (http://probots.co.in/index.php?main_page=product_info&cPath=55_56&products_id=395) which has a current limiting resistor attached on pin 13.
Also, in the blog post I pointed that most Arduinos have a led connected to pin 13 and adding the LED was optional.
However, I will update the post.

Grumpy_Mike

The reason that the series resistor was removed from the official arduino boards was that it interfered with the action of the SPI interface that also uses that pin.
Quote
I will update the post.

Thanks


Hrendor66


Quote
Also, I think adding comments indicating the codes purpose is important to keep arduino v processing code separated in my brain.

I've posted the whole code at https://gist.github.com/abhikpal/6822845. I avoided putting comments as each line of code was explained in the tutorial itself.


Thanks, but what I meant was, just a comment at the top indicating if the code was for processing or arduino - be it just a sub-section of code being analyzed or what ever. I found my self reading code and not certain if it was arduino or processing code.

Abhik

I updated the final Arduino and Processing code snippets. :)

Go Up