Quickstart

We assume that you already have downloaded and installed the Arduino Software and you already tried to create and run some .ino project files.

Generino is a computer program written in FCL, a programming language specifically designed to develop code generators. In order to run it, download and install FormalCapture, which is free for non commercial use.

Then download the Generino code generator and expand the archive in your hard disk.

Inside the archive you have downloaded, you will find a file named generino.fcr:

Doubleclick on generino.fcr and the FormalCapture IDE will pop up:

You are now ready to create your first Generino program. Click on the "Target project" tab [1] and click "New target" [2]:

Choose a path and a name for your project [1] and save it [2]:

Click on the "Target" tab [1], right click [2] and select "Create and add a 'GINO' file" [3]:

Give a name to your source file and save it:

It is now time to type in a Generino program. The example below blinks the default led on port #13:

FILE "prog1\\prog1.ino"

DECLARE DIGITAL OUTPUT ledPin = 13

CLASS BlinkingLed
  TIMER timer1

  START
    SET TIMER timer1 TO 0
  END START

  STATE ledOff
    ON EVENT timer1
      DIGITAL WRITE HIGH TO PIN ledPin
      SET TIMER timer1 TO 1000
      SET STATE ledOn
    END
  END STATE

  STATE ledOn
    ON EVENT timer1
      DIGITAL WRITE LOW TO PIN ledPin
      SET TIMER timer1 TO 1000
      SET STATE ledOff
    END
  END STATE

END CLASS

OBJECT BlinkingLed led1

Double-click on your newly created file on the left window [1]; then copy the program above and paste it in the source window [2]; click on "Run" (or press F5) and compile the program [3]. In the lower window, you will see the compilation results [4]:

Generino will have now generated the prog1.ino under the prog1 directory, placed where you saved your target project:

Double click it and the Arduino interface will popup. Click on the "Downlload" icon and send the program to your Arduino:

If everything went right, your Arduino should be blinking its internal led with a 2-seconds period (1" off, 1" on).

IMPORTANT: if you change the Generino program and generate again the .ino file, you have to close and re-open the Arduino interface, otherwise changes will not be detected.