meteorolog.ino 625 Bytes
Newer Older
1 2 3 4 5 6
/*-----------------------------------------------------------------------------
 *  Author: Nelso G. Jost (nelsojost@gmail.com)
 *  License: GPLv2
 *  Purpose: Entry point for the Arduino Toolchain.
 *---------------------------------------------------------------------------*/

7 8
#include <Wire.h>
#include "mysensors.h"
9
#include "boardcommands.h"
10

11 12
#define  BAUDRATE  9600

13 14
String stream_line;

15

16 17
void setup()
{
18
    Serial.begin(BAUDRATE);
19 20 21
    mysensors_setup();
}

22

23 24 25 26 27
void loop()
{
    if (Serial.available())
    {
        stream_line = Serial.readString();
28
        Serial.println(execute_board_command(stream_line));
29 30
    }
}