<commit_before>'use strict';

var GrovePi      = require('node-grovepi').GrovePi;
var Board        = GrovePi.board;
var AnalogSensor = GrovePi.sensors.base.Analog;
var pinID        = 'A0';

var StateMachine = require('./stateMachine');
var Notifier     = require('./notifier');
var config = {
    apiKey: 'key-XXX',                 // MailGun の API Key を指定
    domain: 'sandboxXXX.mailgun.org',  // MailGun の Subdomain を指定
    from  : 'XXX@XXX',                 // メール送信元
    ngMessage: '土が乾いたよ。お水をあげてください。',
    okMessage: 'お水ありがとう。'
};

var board = new Board({
    onInit: function(res) {
        if (res) { return; }

        var humiditySensor = new AnalogSensor(pinID);
        var stateMachine   = new StateMachine();
        var notifier       = new Notifier(config);
        setInterval(function(){
            var value = humiditySensor.read();
            stateMachine.updateState(value);
            if (stateMachine.notification === 'OK') {
                notifier.notifyOK();
            } else if (stateMachine.notification === 'NG') {
                notifier.notifyNG();<commit_msg>module pathを更新<commit_after>'use strict';

var GrovePi      = require('node-grovepi').GrovePi;
var Board        = GrovePi.board;
var AnalogSensor = GrovePi.sensors.base.Analog;
var pinID        = 'A0';

var StateMachine = require('./lib/stateMachine');
var Notifier     = require('./lib/notifier');
var config = {
    apiKey: 'key-XXX',                 // MailGun の API Key を指定
    domain: 'sandboxXXX.mailgun.org',  // MailGun の Subdomain を指定
    from  : 'XXX@XXX',                 // メール送信元
    ngMessage: '土が乾いたよ。お水をあげてください。',
    okMessage: 'お水ありがとう。'
};

var board = new Board({
    onInit: function(res) {
        if (res) { return; }

        var humiditySensor = new AnalogSensor(pinID);
        var stateMachine   = new StateMachine();
        var notifier       = new Notifier(config);
        setInterval(function(){
            var value = humiditySensor.read();
            stateMachine.updateState(value);
            if (stateMachine.notification === 'OK') {
                notifier.notifyOK();
            } else if (stateMachine.notification === 'NG') {
                notifier.notifyNG();
{'fraction_non_alphanumeric': 0.12958767557770728, 'fraction_numerical': 0.0009062075215224287, 'mean_word_length': 2.2280701754385963, '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': '3045526', 'n_tokens_mistral': 725, 'n_tokens_neox': 692, 'n_words': 154}