Skip to content

Instantly share code, notes, and snippets.

View CelliesProjects's full-sized avatar
🖥️
Busy coding...

Cellie CelliesProjects

🖥️
Busy coding...
View GitHub Profile
@CelliesProjects
CelliesProjects / PlasmaBolVU.ino
Last active September 21, 2017 19:57
PlasmaBol
extern "C" {
#include "user_interface.h"
}
void setup() {
pinMode(BUILTIN_LED, OUTPUT );
analogWriteFreq(1000);
system_update_cpu_freq(160);
}
@CelliesProjects
CelliesProjects / esp32ds18b20_nodelay.ino
Created August 8, 2017 07:57
ESP32 DS18B20 no delay
#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];
//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 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!
@CelliesProjects
CelliesProjects / MilliSecondClock.ino
Last active November 19, 2021 07:25
Millisecond clock take2 with fps counter for ESP32 with 64x128 SSD1306 OLED display.
/***********************************************
* 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
@CelliesProjects
CelliesProjects / SdFormatter.ino
Created September 21, 2017 10:18
SDformatter from Espressif adapted to HW SPI, disables other SS pin ( for 320x240 ebay/aliexpress breakout with SD, TFT and touch )
/*
* 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/
*
@CelliesProjects
CelliesProjects / QuickStartSD.ino
Last active September 21, 2017 19:55
QuickStartSD from Espressif adapted to HW SPI - ( for 320x240 ebay/aliexpress breakout with SD, TFT and touch )
// 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
@CelliesProjects
CelliesProjects / up_test.htm
Created September 21, 2017 14:54
Simple JS uploader
<!-- 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');
@CelliesProjects
CelliesProjects / LongFileName.ino
Created September 21, 2017 20:44
LongFileName from Espressif adapted to HW SPI, disables TFT CS pin ( for 320x240 ebay/aliexpress breakout with SD, TFT and touch )
// 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
@CelliesProjects
CelliesProjects / allocateServer.ino
Created September 22, 2017 14:03
Pseudo code to show how to allocate an instance of a server on ESP8266 or ESP32.
#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);