<commit_before>#include <Bridge.h>
#include <BridgeClient.h>
#include <MQTT.h>
#include <ArduinoJson.h>

// Sensors and actuators libs
#include "Ultrasonic.h"
#include "DHT.h"

// Networking
BridgeClient net;
MQTTClient client;

// Sensors and actuators
#define DHTTYPE DHT11

int ultrasonicPin = 2;
int DHTPin = 4;
int buzzerPin = 8;
int ledPin = 3;

DHT dht(DHTPin, DHTTYPE);
Ultrasonic ultrasonic(ultrasonicPin);

// Program
void connect()
{
    Serial.print("Connecting...");
    while (!client.connect("hytta", MQTT_USERNAME, MQTT_PASSWORD))
    {
        Serial.print(".");
        delay(1000);
    }

    Serial.println("\nConnected!");
    client.subscribe("/hello");
}

void messageReceived(String &topic, String &payload)
{
    Serial.println("incoming: " + topic + " - " + payload);
}

void setup()
{
    Bridge.begin();
    Serial.begin(115200);

    client.begin(MQTT_HOSTNAME, net);
    client.onMessage(messageReceived);
    connect();

    Serial.begin(9600);
    dht.begin();
    pinMode(buzzerPin, OUTPUT);
    pinMode(ledPin, OUTPUT);
}

void loop()
{
    // MQTT
    client.loop();
    if (!client.connected())
    {
        connect();
    }

    // read message and operate

    delay(1000);
}

void toggleDigital(int pin, int delayTime)
{
    digitalWrite(pin, HIGH);
    delay(delayTime);
    digitalWrite(pin, LOW);
}

void printDHT(float h, int t)
{
    Serial.print("Humidity: ");
    Serial.print(h);
    Serial.print("\t Temperature: ");
    Serial.print(t);
    Serial.println(" *C");
}
<commit_msg>message<commit_after>#include <Bridge.h>
#include <BridgeClient.h>
#include <MQTT.h>
#include <ArduinoJson.h>

// Sensors and actuators libs
#include "Ultrasonic.h"
#include "DHT.h"

// Networking
BridgeClient net;
MQTTClient client;

// Sensors and actuators
#define DHTTYPE DHT11

int ultrasonicPin = 2;
int DHTPin = 4;
int buzzerPin = 8;
int ledPin = 3;

DHT dht(DHTPin, DHTTYPE);
Ultrasonic ultrasonic(ultrasonicPin);

// Program
void connect()
{
    Serial.print("Connecting to MQTT...");
    while (!client.connect("hytta", MQTT_USERNAME, MQTT_PASSWORD))
    {
        Serial.print(".");
        delay(1000);
    }

    Serial.println("\nConnected!");
    client.subscribe("/hello");
}

void messageReceived(String &topic, String &payload)
{
    Serial.println("incoming: " + topic + " - " + payload);
}

void setup()
{
    Bridge.begin();
    Serial.begin(115200);

    client.begin(MQTT_HOSTNAME, net);
    client.onMessage(messageReceived);
    connect();

    Serial.begin(9600);
    dht.begin();
    pinMode(buzzerPin, OUTPUT);
    pinMode(ledPin, OUTPUT);
}

void loop()
{
    // MQTT
    client.loop();
    if (!client.connected())
    {
        connect();
    }

    // read message and operate

    delay(1000);
}

void toggleDigital(int pin, int delayTime)
{
    digitalWrite(pin, HIGH);
    delay(delayTime);
    digitalWrite(pin, LOW);
}

void printDHT(float h, int t)
{
    Serial.print("Humidity: ");
    Serial.print(h);
    Serial.print("\t Temperature: ");
    Serial.print(t);
    Serial.println(" *C");
}

{'fraction_non_alphanumeric': 0.15696533682145192, 'fraction_numerical': 0.015696533682145193, 'mean_word_length': 3.2783216783216784, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1620242', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1080, 'n_words': 226}