This file contains hidden or 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
/************************************************************************** | |
read bme280 data and display on ssd1306 | |
**************************************************************************/ | |
#include <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#include <Adafruit_Sensor.h> |
This file contains hidden or 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
/******************************************************************* | |
A sketch for controlling a robot with using a web page | |
hosted on a ESP32 | |
based on: https://github.com/witnessmenow/simple-wifi-controlled-rc-car | |
********************************************************************/ | |
// Load Wi-Fi library | |
#include <WiFi.h> | |
#include <WebServer.h> |
This file contains hidden or 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 <QTRSensors.h> | |
// load motor library | |
#include "ESP32MotorControl.h" | |
#define KP 0.5 | |
#define KD 0 | |
#define M1_MAX_SPEED 70 | |
#define M2_MAX_SPEED 70 | |
#define M1_DEFAULT_SPEED 50 |
This file contains hidden or 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 <QTRSensors.h> | |
// This example is designed for use with six analog QTR sensors. These | |
// reflectance sensors should be connected to analog pins A0 to A5. The | |
// sensors' emitter control pin (CTRL or LEDON) can optionally be connected to | |
// digital pin 2, or you can leave it disconnected and remove the call to | |
// setEmitterPin(). | |
// | |
// The setup phase of this example calibrates the sensors for ten seconds and | |
// turns on the Arduino's LED (usually on pin 13) while calibration is going |
This file contains hidden or 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
/******************************************************************* | |
A sketch for controlling a robot with using a web page | |
hosted on a ESP32 | |
based on: https://github.com/witnessmenow/simple-wifi-controlled-rc-car | |
********************************************************************/ | |
// Load Wi-Fi library | |
#include <WiFi.h> | |
#include <WebServer.h> |
This file contains hidden or 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
/******************************************************************* | |
A sketch for controlling a robot with using a web page | |
hosted on a ESP32 | |
based on: https://github.com/witnessmenow/simple-wifi-controlled-rc-car | |
********************************************************************/ | |
// Load Wi-Fi library | |
#include <WiFi.h> | |
#include <WebServer.h> |
This file contains hidden or 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
/************************************************************************** | |
read bme280 data and display on ssd1306 | |
**************************************************************************/ | |
#include <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#include <Adafruit_Sensor.h> |
This file contains hidden or 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
R"( | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
</head> | |
<body> |
This file contains hidden or 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
// META PARAMETERS USED FOR TRAINING | |
// Generation: 143 of 200 | |
// No of experiments per generation: 300 | |
// Spot light displacement: 3.5 | |
// Angular velocity punishment: 10000 | |
// Runtime (episode duration in seconds): 4 | |
// Initial weight max: 4 | |
// Final weight max: 0.25 | |
// Motor force multiplier: 10 | |
// Number of Hidden nodes: 10 |
This file contains hidden or 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
var keypress = require('keypress'); | |
var five = require("johnny-five"); | |
var EtherPortClient = require("etherport-client").EtherPortClient; | |
var board = new five.Board({ | |
port: new EtherPortClient({ | |
host: "xx.xx.xx.xx", | |
port: 3030 | |
}), |