Hi, I have recently got Processing and Arduino talking together but to get Processing to work with my Adafruit motor shield I need to understand the Firmata I upload to my Arduino and how it interacts with processing so I can change it and make it work. Does anybody know any good websites for learning off or templates for me to try and work from?
Thanks
Owen
I need to understand the Firmata I upload to my Arduino and how it interacts with processing so I can change it and make it work.
It might help to tell us which Firmata sketch you are uploading, and what problems you are having with it, and what changes you propose to make.
I don't think that they will help.
Well, basically I want to have processing send some form of data byte to my Arduino, if(lets say X) happens (and maybe receive some). The Arduino will then interpret this and then will for example execute the command: motor.run(FORWARD); as this is the command I need to give my Adafruit Motor shield for it to operate. I just don't know how to get the two to talk to each other. Reading into it, I think that maybe Firmata isn't the way forward as its not a case of writing pin 7 High if event X happens, its then executing a separate line of code which I would have no idea how to integrate into the Firmata sketch. What I basically need is an idiots guide to sending data between the Arduino and Processing.
Thanks
Owen
Reading into it, I think that maybe Firmata isn't the way forward
No argument from me. I totally agree.
What I basically need is an idiots guide to sending data between the Arduino and Processing.
There are plenty of examples that come with Processing that show how to send serial data back and forth. What you need to do is develop a protocol. That is a known set of commands that Processing can send and that the Arduino understands. It's not that difficult. Start with making a list of commands that you want Processing to send, or that you want the Arduino to understand. Either direction works, but don't try to jump back and forth.