<commit_before>var storage = require('./storage.js');

setInterval(function () {
  var reading = new storage.sensorReading();
  reading.temperature = 77.33;
  reading.location.longitude = 122.11;
  reading.location.latitude = 22;

  storage.logData(reading);
}, 1000);<commit_msg>started code for light sensor<commit_after>var storage = require('./storage.js');
var gpio = require('rpi-gpio');
var lightSensorPin = 17;

function setUp() {
  gpio.setup(lightSensorPin, gpio.DIR_IN);
}

setUp();

setInterval(function () {
  gpio.read(lightSensorPin, function(err, value) {
    if (err) {
      console.log('An error ocurred: ' + err);
      return;
    }

    console.log('lightValue is: ' +  value);
  });

  var reading = new storage.sensorReading();
  reading.temperature = 77.33;
  reading.location.longitude = 122.11;
  reading.location.latitude = 22;

  storage.logData(reading);
}, 1000);
{'fraction_non_alphanumeric': 0.15324384787472037, 'fraction_numerical': 0.035794183445190156, 'mean_word_length': 4.0852272727272725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5581354', 'n_tokens_mistral': 328, 'n_tokens_neox': 289, 'n_words': 59}