This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <Adafruit_MPL3115A2.h> | |
// Power by connecting Vin to 3-5V, GND to GND | |
// Uses I2C - connect SCL to the SCL pin, SDA to SDA pin | |
// See the Wire tutorial for pinouts for each Arduino | |
// http://arduino.cc/en/reference/wire | |
Adafruit_MPL3115A2 baro = Adafruit_MPL3115A2(); | |
void setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file uses DEAP (https://github.com/DEAP/deap) | |
# | |
# DEAP is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Lesser General Public License as | |
# published by the Free Software Foundation, either version 3 of | |
# the License, or (at your option) any later version. | |
# | |
# DEAP is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This experiment is compatible with SCOOP. | |
# After installing scoop you can run the program with python -m scoop basic-gp.py | |
# This file uses DEAP (https://github.com/DEAP/deap) | |
# | |
# DEAP is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Lesser General Public License as | |
# published by the Free Software Foundation, either version 3 of | |
# the License, or (at your option) any later version. | |
# | |
# DEAP is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--- parameters for the XOR-2 experiment ---# | |
# The `Types` section specifies which classes should be used for various | |
# tasks in the NEAT algorithm. If you use a non-default class here, you | |
# must register it with your Config instance before loading the config file. | |
[Types] | |
stagnation_type = DefaultStagnation | |
reproduction_type = DefaultReproduction | |
[phenotype] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#dependencies | |
import gym | |
from neat import nn, population, statistics | |
import os | |
import visualize | |
# env = gym.make('CartPole-v0') | |
env = gym.make('CartPole-v1') | |
#I got lazy, change this before running a new experiment... or better yet write something to figure out what the next name should be! | |
monitor_path = './tmp/cartpole-experiment-14' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int garage_pin = D0; | |
int led_pin = D7; | |
bool door_enabled = true; | |
int setDoorEnabled(String data){ | |
door_enabled = (data == "true"); | |
Spark.publish("door_enabled_changed", ""+door_enabled); | |
} |