Skip to content

Instantly share code, notes, and snippets.

View ESPectro32_PN532
#if 0
#include <SPI.h>
#include <PN532_SPI.h>
#include "PN532.h"
PN532_SPI pn532spi(SPI, 10);
PN532 nfc(pn532spi);
/* When the number after #elif set as 1, it will be switch to HSU Mode*/
#elif 0
View ESPectro32_MQ-2
#include <Wire.h>
#include "SSD1306.h"
int asap = 2;
int sensorThres = 400;
SSD1306 display(0x3c, 21, 22);
void setup() {
Serial.begin(9600);
View ESPectro32_LDR
int ldr = 2;
int ldrValue;
int led = 15;
void setup() {
Serial.begin(9600);
pinMode(led, OUTPUT);
}
void loop() {
View ESPectro32_Ultrasonic_3
#include <Wire.h>
#include "SSD1306.h"
SSD1306 display(0x3c, 21, 22);
const int trigger = 2;
const int echo = 5;
int distance;
long duration;
View ESPectro32_Ultrasonic_2
#include <Arduino.h>
#include <ESPectro32_Board.h>
#include <ESPectro32_RGBLED_Animation.h>
const int trigger = 2;
const int echo = 5;
int distance;
long duration;
View ESPectro32_Ultrasonic
const int trigger = 2;
const int echo = 5;
int distance;
long duration;
void setup() {
Serial.begin(9600);
pinMode(trigger, OUTPUT);
pinMode(echo, INPUT);
}
View ESPectro32_OLED
#include <Wire.h>
#include "SSD1306.h"
SSD1306 display(0x3c, 21, 22);
int photoPin = 36;
float potValue = 0;
float potVoltage = 0;
void setup() {
View ESPectro32_LSM6DS3
#include <Arduino.h>
#include <ESPectro32_Board.h>
#include <ESPectro32_RGBLED_Animation.h>
#include "SparkFunLSM6DS3.h"
#include "Wire.h"
#include "SPI.h"
RgbLedColor_t aCol(200, 0, 0);
RgbLedColor_t bCol(0, 200, 0);
RgbLedColor_t cCol(0, 0, 200);
View ESPectro32_Running Text
#include <esp_log.h>
#include <ESPectro32_Board.h>
#include <ESPectro32_LedMatrix_Animation.h>
ESPectro32_LedMatrix_ScrollTextAnimation ledMatrixTextAnim;
static void load_ex_ledmatrix_anim() {
ledMatrixTextAnim.setLedMatrix(ESPectro32.LedMatrix());
ledMatrixTextAnim.scrollText("Hello World!!", 6000);
}
View ESPectro32_Adafruit_IS31FL3731
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_IS31FL3731.h>
Adafruit_IS31FL3731 matrix = Adafruit_IS31FL3731();
static const uint8_t PROGMEM
triangle[] =
{ B00000000,
B00010000,