As part ofmy projectrobotcontrolcomputerIneeda program thatcansend commandsvia the serial port(the side of therobotwhilerunningtestwithArduinoboard serialmonitor)so I choseprocessingbut the programdoes not sendthecode, soyou can helpto findthe error in theprogramme.
import interfascia.*; import processing.serial.*; Serial port;
GUIController c;
IFButton av, ar, g, d, s, a, m;
int controle ; int controle1 ;
void setup() {
size(600, 600); port = new Serial(this, "COM6", 9600); port.bufferUntil('\n'); println("connecter");
background(155);
c = new GUIController (this);
av = new IFButton ("Avant", 250, 130, 80, 80); ar = new IFButton ("Ariere", 250, 370, 80, 80); g = new IFButton ("Gauche", 130, 250, 80, 80); d = new IFButton ("Droite", 370, 250, 80, 80); s = new IFButton ("Stop", 250, 250, 80, 80); a = new IFButton ("Automatique", 15, 550, 80, 30); m = new IFButton ("Manuelle", 100, 550, 80, 30);
//Envoi de la commande de controle void serialEvent (Serial port) { println("hbbhbhbgbhbhhj"); port.write(controle1); port.write(controle); println("envoyer");