<commit_before>/**********************************************************************/
/* PulseCounter example
/* An example to collect data from a flowmeter using PulseSensor class
/* version 0.2 BETA 14/09/2015
/* Author: <NAME>  @peninquen
/* Licence: Apache License Version 2.0.
/*
/**********************************************************************/
/*
EFFECT HALL FLOWMETER
TECHNICAL DETAILS

 Electrical:
Working Voltage: 5 to 18VDC
Max current draw: 15mA @ 5V
Working Flow Rate: 1 to 30 Liters/Minute
Working Temperature range: -25 to 80°C
Working Humidity Range: 35%-80% RH
Maximum water pressure: 2.0 MPa
Output duty cycle: 50% +-10%
Output rise time: 0.04us
Output fall time: 0.18us
Flow rate pulse characteristics: Frequency (Hz) = 7.5 * Flow rate (L/min)
Pulses per Liter: 450
Durability: minimum 300,000 cycles
Mechanical:
1/2" NPS nominal pipe connections, 0.78" outer diameter, 1/2" of thread
Size: 2.5" x 1.4" x 1.4"
*/

#include "PulseSensor.h"


#define REFRESH_INTERVAL  1000      // refresh time, 1 second
#define WRITE_INTERVAL 5000  // values send to serial port, 5 seconds (5 * 1000)
#define PULSE_PIN 18 // see external interrupt pins available on your Arduino.
                     // Conect an external 10 Kohm pull up resistor  on input pin is recomended
#define PULSES_SEC_2_LITERS_MINUTE 7.5 // conversion factor from pulses/second to liters/minute
#define PULSES_2_LITERS 450 // conversion factor from pulses to liters
PulseSensor flowmeter; // instance to collect data
//variables to process and send values
float flowRate;
float maxRate;
float minRate;
float acumFlow;
float lastAcumFlow;
boolean firstData;

unsigned long previousMillis = 0;
unsigned long currentMillis = 0;
<commit_msg>minor changes<commit_after>/**********************************************************************/
/* Flowmeter example
/* An example to collect data from a flowmeter using PulseSensor class
/* version 0.3 BETA 22/09/2015
/* Author: <NAME>  @peninquen
/* Licence: Apache License Version 2.0.
/*
/**********************************************************************/
/*
EFFECT HALL FLOWMETER
TECHNICAL DETAILS

 Electrical:
Working Voltage: 5 to 18VDC
Max current draw: 15mA @ 5V
Working Flow Rate: 1 to 30 Liters/Minute
Working Temperature range: -25 to 80°C
Working Humidity Range: 35%-80% RH
Maximum water pressure: 2.0 MPa
Output duty cycle: 50% +-10%
Output rise time: 0.04us
Output fall time: 0.18us
Flow rate pulse characteristics: 
Flow rate: 1 pulse/s = 7.5 L/min
Acumulated volume: 1 Liter = 450 pulses
maximum pulse frequency: 30 L/min-> 225 imp/s -> min period 4.44 ms  (delta 0.1 L/min->0.015 ms)
                          5 L/min-> 37.5 imp/s->     period 26.66 ms (delta 0.1 L/min->0.523 ms)
minimun pulse frequency:  1 L/min-> 7.5 imp/s -> max period 133.3 ms (delta 0.1 L/min->12.1 ms)
Durability: minimum 300,000 cycles
Mechanical:
1/2" NPS nominal pipe connections, 0.78" outer diameter, 1/2" of thread
Size: 2.5" x 1.4" x 1.4"
*/

#include "PulseSensor.h"


#define REFRESH_INTERVAL  1000          // refresh time, 1 second
#define WRITE_INTERVAL 5000             // values send to serial port, 5 seconds (5 * 1000)
#define PULSE_PIN 18                    // see external interrupt pins available on your Arduino.
#define PULSES_2_LITERS 450             // coefficient conversion from pulses to liters
#define PULSES_SEC_2_LITERS_MINUTE 7.5  // (450/60) coefficient conversion pulses/second from to liters/minute
PulseSensor flowmeter;                  // instance to collect data
//variables to process and send values
float flowRate;
float maxRate;
float minRate;
float acumFlow;
float lastAcumFlow;
boolean firstData;

unsigned long previousMillis = 0;
unsigned long currentMillis = 0;

{'fraction_non_alphanumeric': 0.15654268129515655, 'fraction_numerical': 0.06181428953706181, 'mean_word_length': 3.8046272493573263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '3772597', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1117, 'n_words': 450}