let me clarify
the though was for processing to do some variable and config stuff.
then using the arduino.cc class and firmata on the chip be able to upload a sketch to processing.
with the answer provided above. a different approach is required.
I have played around with a blink on roll over sketch using processing and firmata to set HIGH or LOW the pin 13 LED.
In all the reference to the arduino library for processing i have not seen any instance where i can call a method that i have create on the arduino side.
let me describe
Arduino// firmata included
void setup(){}
void loop(){}
void customMethod(){}
Processing/*
some code ommited
*/
import processing.serial.*;
import cc.arduino.*;
Serial port;
Arduino arduino;
void setup()
{
arduino = new Arduino(this, Arduino.list()[0], 57600);
}
void draw()
{
background(#000000);
fill(#000000);
rect(0,0,200,200);
}
void mousePressed()
{
/*
i want to fire off a method called customMethod in the arduino code
this doesn't work
*/
arduino.customMethod();
}
This is the snippet i would like to work
void mousePressed()
{
/*
i want to fire off a method called customMethod in the arduino code
this doesn't work
*/
arduino.customMethod();
}can this be done?