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
extern "C" { | |
#include "user_interface.h" | |
} | |
void setup() { | |
pinMode(BUILTIN_LED, OUTPUT ); | |
analogWriteFreq(1000); | |
system_update_cpu_freq(160); | |
} |
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 "MHDS18B20.h" | |
OneWire ds(5); // on pin D2 (a 4.7K resistor is necessary) | |
int numberOfSensors; | |
byte currentAddr[8]; | |
struct sensorStruct { | |
byte addr[8]; | |
} sensor[3]; |
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
//https://github.com/espressif/arduino-esp32/issues/425 | |
//http://www.fisch.lu/junk/ESP32-WebServer.zip | |
//Install webserver zip to ~/Arduino/hardware/espressif/esp32/libraries/ | |
#include "WiFi.h" PROGMEM | |
#include <ESP32WebServer.h> PROGMEM | |
ESP32WebServer server(80); | |
void setup(){ | |
Serial.begin(115200); |
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 is our GFX example for the Adafruit ILI9341 Breakout and Shield | |
----> http://www.adafruit.com/products/1651 | |
Check out the links above for our tutorials and wiring diagrams | |
These displays use SPI to communicate, 4 or 5 pins are required to | |
interface (RST is optional) | |
Adafruit invests time and resources providing this open source code, | |
please support Adafruit and open-source hardware by purchasing | |
products from Adafruit! |
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
/*********************************************** | |
* Millisecond clock by Cellie | |
* needs a 128x64 SSD1306 OLED on pins 19 and 23 | |
**********************************************/ | |
#include "WiFi.h" | |
#include "SSD1306.h" //https://github.com/squix78/esp8266-oled-ssd1306 | |
// i2c pin definitions for oled | |
#define I2C_SCL_PIN 19 | |
#define I2C_SDA_PIN 23 |
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 program will format an SD or SDHC card. | |
* Warning all data will be deleted! | |
* | |
* For SD/SDHC cards larger than 64 MB this | |
* program attempts to match the format | |
* generated by SDFormatter available here: | |
* | |
* http://www.sdcard.org/consumers/formatter/ | |
* |
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
// Quick hardware test for SPI card access. | |
// | |
#include <SPI.h> | |
#include "SdFat.h" | |
#define _dc 27 // Goes to TFT DC | |
#define _sclk 25 // Goes to TFT SCK/CLK | |
#define _mosi 32 // Goes to TFT MOSI | |
#define _miso 14 // Goes to TFT MISO | |
#define _cs 4 // Goes to TFT CS |
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
<!-- http://blog.teamtreehouse.com/uploading-files-ajax --> | |
<form id="file-form" action="api/upload" method="POST"> | |
<input type="file" id="file-select" name="photos[]" multiple/> | |
<button type="submit" id="upload-button">Upload</button> | |
</form> | |
<script> | |
var form = document.getElementById('file-form'); | |
var fileSelect = document.getElementById('file-select'); | |
var uploadButton = document.getElementById('upload-button'); |
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
// Example use of lfnOpenNext and open by index. | |
// You can use test files located in | |
// SdFat/examples/LongFileName/testFiles. | |
#include<SPI.h> | |
#include "SdFat.h" | |
#include "FreeStack.h" | |
#define TFT_DC 27 // Goes to TFT DC | |
#define SPI_SCK 25 // Goes to TFT SCK/CLK |
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 <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
ESP8266WebServer *server; | |
void setup(){ | |
//This allocates a new instance of ESP8266WebServer | |
server=new(ESP8266WebServer); |
OlderNewer