Hello, I have a rather difficult question for whoever thinks they are up to it!
I have created a program in Processing to respond to particular mouse clicks. However, I would like to link my code from Arduino into it. In my Arduino code I am controlling a Stewart Platform, and two different steppers.
How can I transfer this Arduino code to Processing. Should I be using serial commands? How do I do this? Should I also use FIRMATA since I have a lot of pins being used? (This is all run on the MEGA)
Thanks!
ARDUINO CODE:
#include <Servo.h>
double x = 0;
double y = 0;
double z = 0;
double psi = 0; // yaw nothing more than .4 // z-axis
double theta = 0; //roll nothing more than .2 // y-axis
double phi = 0; //pitch nothing more than .2 // x-axis
I am trying to create code in processing that will do three things:
1) Respond to mouse clicks on many different arrows on my size layout.
2) When a click is detected, to increase a specific counter (one counter per pair of arrows) correlating to that pair of arrows.
3) Only let the arrows increase that specific counter when my mouse is inside them.
I am very new to this and the working code I have now is just a graphic, the code I've been working on to get this some what working I will post separately.
Please, any help is accepted and appreciated! Thank-you!
// *Code for "THE ROBOGNATHIC" Dental Articulator Windows-based touch screen platform.*
PFont f; // Declaring an object.
void setup(){
size (900,550); // Setting up tablet screen size.
background(150); // Setting the background to grey.
stroke(0); // Setting the outline to black.
f = createFont ("Arial",16,false); // Referencing the font name and function; Arial, 16 pt., anti-aliasing off.