<commit_before>#include <iostream>

#include "CmdMessenger.h"

using namespace std;

enum
{
  ksetled
};

int main(int argc, char *argv[])
{
  if(argc == 2){

    char op;
    cmd::CmdMessenger arduino(argv[1], 9600);
    cmd::Cmd led(ksetled);

    cmd::Timeout timeout = cmd::Timeout::simpleTimeout(1000);
    arduino.setTimeout(timeout);

    while(true)
    {
      cout << "'1' turns on, '0' turns off, 'q' quits: ";
      cin >> op;
      cout << endl;

      switch(op)
      {
        case '1':
          led << true << CmdEnd();
          arduino.send(led);

          cout << led.getNumArgs() << endl;
          led.clear();<commit_msg>Change the baudrate according to the CmdMessenger Receive example<commit_after>#include <iostream>

#include "CmdMessenger.h"

using namespace std;

enum
{
  ksetled
};

int main(int argc, char *argv[])
{
  if(argc == 2){

    char op;
    cmd::CmdMessenger arduino(argv[1], 115200);
    cmd::Cmd led(ksetled);

    cmd::Timeout timeout = cmd::Timeout::simpleTimeout(1000);
    arduino.setTimeout(timeout);

    while(true)
    {
      cout << "'1' turns on, '0' turns off, 'q' quits: ";
      cin >> op;
      cout << endl;

      switch(op)
      {
        case '1':
          led << true << CmdEnd();
          arduino.send(led);

          cout << led.getNumArgs() << endl;
          led.clear();
{'fraction_non_alphanumeric': 0.1575037147102526, 'fraction_numerical': 0.020802377414561663, 'mean_word_length': 2.462724935732648, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2445140', 'n_tokens_mistral': 494, 'n_tokens_neox': 462, 'n_words': 111}