I'm trying to use processing to create a simple graphical front end to operate a stepper motor that I have hooked up to an Arduino. Currently, I have a program on the arduino such that it is listening for serial communication to move the stepper motor. I have two "buttons" that I've created with processing. The goal being that when I click on the upper button, it writes a value to the serial buffer, and when I click the lower button, it sends a different value. Here is my current code:
import processing.serial.*;
void setup(){
Serial myPort;
myPort= new Serial(this, Serial.list()[1], 9600);