Seems like it is time for you to start learning Linguino! The easiest way is to start with Blink the LED example. In this example we will guide you through the necessary steps to create your first Arduino program using Linguino.
In the following example you will dive into XML (eXtended Markup Language) to build your first Arduino program. Nonetheless, is not mandatory to know XML at all! In fact to build Linguino programs you may not have any programming skills at all.
The most basic and important Linguino property is the Agent. Agents may be seen as a the program itself, since all properties declared inside the XML's Agent tag, will live inside an Arduino board.
To start developing agents go to your project folder src/agents and create your first agent. You may call it blink_led_agent.xml.
The property name in the example above is the only mandatory for agents. This identify the agent in a much bigger system, with multiple Arduinos (right now we are not going on that detail).
Modules are where your code "lives". You can imagine your program as a set of little blocks, executed sequently. Every of these blocks are your modules.
Inside modules you can define both name and function (...for now!). The name works as the agent's name: to identify the module inside agent (and inside a bigger system). The function defines what is to be executed by the module.
Lets keep to our example and blink a LED! To do this, we will actually need two modules to turn on and then off a LED, using two Linguino's built-in functions: digitalLow and digitalHigh
The std:: and (13) in the example, are not typos! What those mean is that:
If you were to use the program above you wouldn't actually see the LED blink. This happens because the execution loop of Arduino is so fast that basically you wouldn't notice the changes in the LED.
To achieve these behavior, just add two more modules, one after each of the already defined, with the built-in sleep function.
That's it! You wrote your first Linguino program. Yes, is that simple. Now we don't want to be stuck here with a program that does not run at all.
Hands on! Lets build, deploy and run this program on Build, deploy, run!