<commit_before>/*
  senseBox Citizen Sensingplatform
  WiFi Version: 1.2
  Date: 2017-02-28
  Homepage: http://www.sensebox.de
  Author: Institute for Geoinformatics, University of Muenster
  Note: Sketch for SB-Home WiFi Edition
  Code is in the public domain.
*/

#include <avr/wdt.h>
#include "BMP280.h"
#include <Wire.h>
#include <HDC100X.h>
#include <SPI.h>
#include <WiFi101.h>
#include <Makerblog_TSL45315.h>

//Custom WiFi Parameters
const char ssid[] = "";       //  your network SSID (name)
const char pass[] = "";       // your network password

//Network settings
@-- tmpl postDomain // const char *server = "";
uint8_t status = WL_IDLE_STATUS;
WiFiClient client;

//Sensor Instances
Makerblog_TSL45315 TSL = Makerblog_TSL45315(TSL45315_TIME_M4);
HDC100X HDC(0x43);
BMP280 BMP;

//measurement variables
#define UV_ADDR 0x38
#define IT_1   0x1
double tempBaro, pressure;
char result;

typedef struct sensor {
  const uint8_t ID[12];
} sensor;

uint8_t sensorsIndex = 0;

@-- tmpl ctSensors

@-- tmpl IDs

uint8_t contentLength = 0;

float values[NUM_SENSORS];

void addValue(const float &value) {
  values[sensorsIndex] = value;
  sensorsIndex = sensorsIndex + 1;
}

uint16_t getUV() {
  byte msb = 0, lsb = 0;
  uint16_t uvValue;
  Wire.requestFrom(UV_ADDR + 1, 1); //MSB
  sleep(1);
  if (Wire.available()) msb = Wire.read();
  Wire.requestFrom(UV_ADDR + 0, 1); //LSB
  sleep(1);
  if (Wire.available()) lsb = Wire.read();
  uvValue = (msb << 8) | lsb;
  return uvValue * 5;<commit_msg>Fixed calculation of UV intensity<commit_after>/*
  senseBox Citizen Sensingplatform
  WiFi Version: 1.2
  Date: 2017-02-28
  Homepage: http://www.sensebox.de
  Author: Institute for Geoinformatics, University of Muenster
  Note: Sketch for SB-Home WiFi Edition
  Code is in the public domain.
*/

#include <avr/wdt.h>
#include "BMP280.h"
#include <Wire.h>
#include <HDC100X.h>
#include <SPI.h>
#include <WiFi101.h>
#include <Makerblog_TSL45315.h>

//Custom WiFi Parameters
const char ssid[] = "";       //  your network SSID (name)
const char pass[] = "";       // your network password

//Network settings
@-- tmpl postDomain // const char *server = "";
uint8_t status = WL_IDLE_STATUS;
WiFiClient client;

//Sensor Instances
Makerblog_TSL45315 TSL = Makerblog_TSL45315(TSL45315_TIME_M4);
HDC100X HDC(0x43);
BMP280 BMP;

//measurement variables
#define UV_ADDR 0x38
#define IT_1   0x1
double tempBaro, pressure;
char result;

typedef struct sensor {
  const uint8_t ID[12];
} sensor;

uint8_t sensorsIndex = 0;

@-- tmpl ctSensors

@-- tmpl IDs

uint8_t contentLength = 0;

float values[NUM_SENSORS];

void addValue(const float &value) {
  values[sensorsIndex] = value;
  sensorsIndex = sensorsIndex + 1;
}

uint16_t getUV() {
  byte msb = 0, lsb = 0;
  uint16_t uvValue;
  Wire.requestFrom(UV_ADDR + 1, 1); //MSB
  sleep(1);
  if (Wire.available()) msb = Wire.read();
  Wire.requestFrom(UV_ADDR + 0, 1); //LSB
  sleep(1);
  if (Wire.available()) lsb = Wire.read();
  uvValue = (msb << 8) | lsb;
  return uvValue * 5.625;
{'fraction_non_alphanumeric': 0.128722700198544, 'fraction_numerical': 0.05261416280608868, 'mean_word_length': 3.8758064516129034, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3218169', 'n_tokens_mistral': 1271, 'n_tokens_neox': 1141, 'n_words': 315}