This Arduino library (Monitor directory), works together with java program “ArduinoMonitor.jar” running on computer and it has to be located into Arduino Libraries directory.
The purpose of this cooperation is to realize a simple monitor for Arduino. A monitor managed by Arduino like a display and keyword by a computer.
ArduinoMonitor.jar open a window with several fields to display values and several button to manage Arduino inputs.
Display fields:
Activators:
Commands available:
| COMMAND | MEANING | PARAMETERS |
| openM(baud-rate) |
open communication | baud-rate=Arduino serial possible values |
| closeM() | close communication | |
| writeAna(value,destination) | displays a value to destination field (level bars) | int value(0to1024), byte destination(0to5) |
| writeDig(value,destination) | switch on/off (value 1/0) the destination led | int value(0to1), byte destination(2to13) |
| plotFun(value,destination) | plots function (identified by destination number 0to5) | byte destination(0to5) |
| plotReset(destination) | stop plot ; if destination=6 cancel all plots | byte destination(0to6) |
| plotFunX(value) | plots function X-Y : value X | int value(0to1024) |
| plotFunY(value) | plots function X-Y : value Y | int value(0to1024) |
| readDig(source) | returns 0/1 from button | return byte(0to1), byte source(2to13) |
| readPWM(source) | returns value 0 to 255 from slide | return byte(0to255), byte source(3,5,6,9,10,11) |
Use:
Define monitor : es. Monitor m=Monitor() (outside functions setup and loop)
Open monitor : es. m.openM(9600) (in setup function)
Use monitor : es. m.writeAna(value,4)… etc