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 "arduinoFFT.h" | |
//#include <M5Stack.h> | |
#include <esp_wifi.h> | |
#include <TFT_eSPI.h> | |
//#include <M5Display.h> // This library is a lot faster! But also a lot larger. | |
#define microphone 34 | |
#define speaker 25 | |
#define backlight 32 |
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
//sampling and FFT in a seperate task ( core 0 ) | |
//display the result in another task (core 1 ) | |
//#include <TFT_eSPI.h> | |
#include <M5Stack.h> | |
#include <M5Display.h> // This library is a lot faster! But also a lot larger. | |
#define microphone 34 | |
#define speaker 25 | |
#define backlight 32 |
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 super simple sampler for the M5Stack-Fire board */ | |
//#include <TFT_eSPI.h> | |
#include <M5Display.h> // This library is a lot faster! But also a lot larger. | |
#define speaker 25 | |
#define microphone 34 | |
#define numberOfBits 8 | |
#define channel 0 | |
#define graphWidth 320 |
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
// Load Wi-Fi library | |
#include <WiFi.h> | |
// Replace with your network credentials | |
const char* ssid = "YOURSIDD"; | |
const char* password = "YOURPSK"; | |
void setup(){ | |
IPAddress local_IP(192, 168, 0, 60); /* THIS SHOULD BE OUTSIDE YOUR ROUTERS DHCP RANGE! */ |
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
#define NUMBER_OF_CHANNELS 5 | |
#define MAX_TIMERS 50 | |
#define MAX_NUMBER_OF_SENSORS 3 | |
/************************************************************************** | |
type definitions | |
**************************************************************************/ | |
enum lightStatus_t | |
{ | |
LIGHTS_OFF, LIGHTS_ON, LIGHTS_AUTO |
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
static int relayPin=0; | |
server.on("/relay/toggle", HTTP_POST, [](AsyncWebServerRequest *request) | |
{ | |
AsyncResponseStream *response; | |
response = request->beginResponseStream( "text/plain" ); | |
bool newState = !digitalRead(relayPin); | |
digitalWrite(relayPin, newState); | |
response->printf( "{\"relay\" : \"%s\"}", newState ? "on" : "off" ); | |
request->send( response ); |
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
/* | |
* EXAMPLE READING AND WRITING A C++ STRUCT TO A FILE | |
*/ | |
#include <FS.h> | |
#include <FFat.h> | |
const char *fileName = "/somefile.txt"; | |
struct aStruct { | |
char someString[11]; |
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
/* Modified to show HW SPI at 80Mhz from ESP32 ESP-WROVER-KIT by Cellie */ | |
/*************************************************** | |
Modified graphics demo for the ESP-WROVER-KIT and equivalent | |
projects using Ardiono-ESP32 with an ILI9341 LCD display | |
By Martin Falatic | |
****************************************************/ | |
/*************************************************** | |
This is our GFX example for the Adafruit ILI9341 Breakout and Shield | |
----> http://www.adafruit.com/products/1651 |
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
/* | |
WiFiTelnetToSerial - Example Transparent UART to Telnet Server for ESP32 | |
Copyright (c) 2017 Hristo Gochkov. All rights reserved. | |
This file is part of the ESP32 WiFi library for Arduino environment. | |
This library 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 2.1 of the License, or (at your option) any later version. |
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
/* http://www.learncpp.com/cpp-tutorial/812-static-member-functions/ */ | |
#include "myClass.h" | |
void setup() { | |
xTaskCreatePinnedToCore( | |
myClass::myFunction, /* Task function. */ | |
"myFunction", /* String with name of task. */ | |
10000, /* Stack size in words. */ | |
NULL, /* Parameter passed as input of the task */ |