java - SerialSocketEvent not firing -


i have copied code:http://playground.arduino.cc/interfacing/java java project, , tried this:

void setup(){ serial.begin(9600); while(!serial); }  void loop(){ serial.println("test"); } 

on arduino uno, great results, when tried on esplora, program did not fire event listener java project.

an esplora , leonardo (both use atmega32u4) require wait until cdc serial ready. uno has dedicated atmega8/16u2 controlling serial/usb comms.

in code, after serial.begin() call, add loop wait until ready:

serial.begin(9600);  while (!serial) {   ; // wait serial port connect. } 

cheers


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -