demo_led example on the Arduino BoardThe demo code is written in Java and located in app/src/main/java.
It applies the MVC pattern.
It firstly intends to provide call examples to the ardwloop API.
ardwloop.demo.model.DemoProgram implements the communication with the Arduino board.
That’s the most important class to understand what the Demo program sends and receives from the Arduino board.
It implements the IArdwProgram interface, by particular the 2 core methods:
public SetupData ardwSetup(SetupData setup)public LoopData ardwLoop(LoopData loop)Any program using ardwloop should implement the IArdwProgram interface. See source code.
ardwloop.demo.model.DemoModel is the model from the MVC pattern.
The most important is that it starts the Ardwloop threads in its start() method, and that it forwards the necessary
commands to its DemoProgram instance.
In addition, it does the optional stuff hereafter:
ardwloop.demo.StartDemo.main() is where the program is started.