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 "EEPROM.h" | |
#define EEPROM_SIZE 8 | |
void setup() { | |
while (!EEPROM.begin(EEPROM_SIZE)) { | |
true; | |
} | |
} |
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 <HardwareSerial.h> | |
HardwareSerial MySerial(1); | |
void setup() { | |
MySerial.begin(9600, SERIAL_8N1, 16, 17); | |
} | |
void loop() { | |
while (MySerial.available() > 0) { |
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 <SPI.h> | |
#include <LoRa.h> | |
volatile bool doRead = false; // Flag set by callback to perform read process in main loop | |
volatile int incomingPacketSize; | |
void setup() { | |
Serial.begin(9600); | |
while (!Serial); |
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 <GP2Y0A02YK0F.h> | |
GP2Y0A02YK0F irSensor; | |
int distance; | |
void setup() | |
{ | |
Serial.begin(9600); | |
irSensor.begin(A0); // Assign A0 as sensor pin | |
} |
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 <VirtualWire.h> | |
uint8_t currentPacket = 0; | |
void setup() { | |
/* | |
* Set TX pin -> Connect FS1000A here | |
*/ | |
vw_set_tx_pin(12); | |
/* |
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 <VirtualWire.h> | |
uint8_t counter = 0; | |
void setup() { | |
/* | |
* Set TX pin -> Connect FS1000A here | |
*/ | |
vw_set_tx_pin(12); | |
/* |
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 <OneWire.h> | |
#include <DallasTemperature.h> | |
#include <ESP8266mDNS.h> | |
#include <ESP8266WiFi.h> | |
#define ALLOWED_CONNECT_CYCLES 40 | |
#define ALLOWED_READ_CYCLES 80 | |
#define ONE_WIRE_BUS 2 // DS18B20 pin | |
OneWire oneWire(ONE_WIRE_BUS); | |
DallasTemperature DS18B20(&oneWire); |
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
privateScope.loadPidController = new classes.PidController(); | |
privateScope.loadPidController.setTarget(privateScope.targetLoad); | |
privateScope.loadPidController.setOutput(0, 97, 0); | |
privateScope.loadPidController.setGains(16, 6, 4); | |
privateScope.loadPidController.setItermLimit(0, 90); |
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
'use strict'; | |
var classes = classes || {}; | |
classes.PidController = function () { | |
var self = {}, | |
privateScope = {}; | |
/** |
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
/* | |
* PPM generator originally written by David Hasko | |
* on https://code.google.com/p/generate-ppm-signal/ | |
*/ | |
//////////////////////CONFIGURATION/////////////////////////////// | |
#define CHANNEL_NUMBER 12 //set the number of chanels | |
#define CHANNEL_DEFAULT_VALUE 1500 //set the default servo value | |
#define FRAME_LENGTH 22500 //set the PPM frame length in microseconds (1ms = 1000µs) | |
#define PULSE_LENGTH 300 //set the pulse length |
NewerOlder