<commit_before>/* 
  Hive Monitor ("Power Cycle" Version)
  Developed by <NAME>
  DAQ controller for hive sensor monitoring.
*/

/* --- Libraries --- */
#include "stdio.h"
#include <Wire.h>
#include <Adafruit_BMP085.h>
#include <DHT.h>

/* --- Definitions --- */
#define DHT_INTERNAL_PIN 4
#define DHT_EXTERNAL_PIN 5
#define VOLTS_PIN A0
#define AMPS_PIN A1
#define RESET_PIN A2
#define RPI_POWER_PIN A3
#define DHT_TYPE DHT22

/* --- Constants --- */
const unsigned int BAUD = 9600;
const unsigned int CHARS = 8;
const unsigned int BUFFER = 128;
const unsigned int DIGITS = 4;
const unsigned int PRECISION = 2;
const unsigned int ON_WAIT = 500;
const unsigned int OFF_WAIT = 1000;
const unsigned int BOOT_WAIT = 5000;
const unsigned int RESET_WAIT = 500; //
const unsigned int PIN_WAIT = 200; // wait for pin to initialize
const unsigned int SERIAL_WAIT = 1000; // wait for serial connection to start
const unsigned int SHUTDOWN_WAIT = 5000; // wait for pi to shutdown
const unsigned int ON_CYCLES = 60; // counter value when it will turn off
const unsigned int OFF_CYCLES = 1200; // counter value when it will back turn on

/* --- Functions --- */
float get_int_temp(void);
float get_int_humidity(void);
float get_ext_temp(void);
float get_ext_humidity(void);
float get_volts(void);
float get_amps(void);

/* --- Objects --- */
DHT int_dht(DHT_INTERNAL_PIN, DHT_TYPE);
DHT ext_dht(DHT_EXTERNAL_PIN, DHT_TYPE);
Adafruit_BMP085 bmp;

/* --- Variables --- */
char INT_TEMPERATURE[CHARS];
char INT_HUMIDITY[CHARS];
char EXT_TEMPERATURE[CHARS];
char EXT_HUMIDITY[CHARS];
char VOLTS[CHARS];
char AMPS[CHARS];
char PASCALS[CHARS];
char JSON[BUFFER];<commit_msg>added pressure proto<commit_after>/* 
  Hive Monitor ("Power Cycle" Version)
  Developed by <NAME>
  DAQ controller for hive sensor monitoring.
*/

/* --- Libraries --- */
#include "stdio.h"
#include <Wire.h>
#include <Adafruit_BMP085.h>
#include <DHT.h>

/* --- Definitions --- */
#define DHT_INTERNAL_PIN 4
#define DHT_EXTERNAL_PIN 5
#define VOLTS_PIN A0
#define AMPS_PIN A1
#define RESET_PIN A2
#define RPI_POWER_PIN A3
#define DHT_TYPE DHT22

/* --- Constants --- */
const unsigned int BAUD = 9600;
const unsigned int CHARS = 8;
const unsigned int BUFFER = 128;
const unsigned int DIGITS = 4;
const unsigned int PRECISION = 2;
const unsigned int ON_WAIT = 500;
const unsigned int OFF_WAIT = 1000;
const unsigned int BOOT_WAIT = 5000;
const unsigned int RESET_WAIT = 500; //
const unsigned int PIN_WAIT = 200; // wait for pin to initialize
const unsigned int SERIAL_WAIT = 1000; // wait for serial connection to start
const unsigned int SHUTDOWN_WAIT = 5000; // wait for pi to shutdown
const unsigned int ON_CYCLES = 60; // counter value when it will turn off
const unsigned int OFF_CYCLES = 1200; // counter value when it will back turn on

/* --- Functions --- */
float get_int_temp(void);
float get_int_humidity(void);
float get_ext_temp(void);
float get_ext_humidity(void);
float get_volts(void);
float get_amps(void);
float get_pressure(void);

/* --- Objects --- */
DHT int_dht(DHT_INTERNAL_PIN, DHT_TYPE);
DHT ext_dht(DHT_EXTERNAL_PIN, DHT_TYPE);
Adafruit_BMP085 bmp;

/* --- Variables --- */
char INT_TEMPERATURE[CHARS];
char INT_HUMIDITY[CHARS];
char EXT_TEMPERATURE[CHARS];
char EXT_HUMIDITY[CHARS];
char VOLTS[CHARS];
char AMPS[CHARS];
char PASCALS[CHARS];
char JSON[BUFFER];
{'fraction_non_alphanumeric': 0.1133034379671151, 'fraction_numerical': 0.03288490284005979, 'mean_word_length': 4.33652312599681, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4611423', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1156, 'n_words': 377}