Skip to content

Instantly share code, notes, and snippets.

View hpwit's full-sized avatar
🐨
new parser for esp32

hpwit

🐨
new parser for esp32
View GitHub Profile
@hpwit
hpwit / updatecode.ino
Last active February 19, 2021 09:49
artnet test
#include <Arduino.h>
#include <FastLED.h>
#include <UIPEthernet.h>
#define NUM_LEDS 120
#define UNIVERSE_SIZE 120
#define START_UNIVERSE 0
#define ARTNET_PORT 6454
const uint8_t universesCount = NUM_LEDS/UNIVERSE_SIZE;
// Hello Yves. Could you please check this code. I will be using different length led strips to fit the guitar matrix shape. A total of 600 leds (although probaly more like 800 !!)
//thanks
#include <WiFi.h>
//#include <ESP8266WiFi.h>
#include "SD.h"
#include "SPI.h"
//#include "FS.h"
#include <WiFi.h>
//#include <ESP8266WiFi.h>
#include "SD.h"
#include "SPI.h"
//#include "FS.h"
#include <Wire.h>
//#include <LiquidCrystal_I2C.h>
//LiquidCrystal_I2C lcd(0x27, 16, 2);
//#include "esp_task_wdt.h"
//#define ARTNET_DEBUG
#define ARTNET_NO_TIMEOUT
#include <ArtnetESP32.h>
#define NBIS2SERIALPINS 2 //number of esp32 pins you will use. the total number of strips available will be NBIS2SERIALPINS * 8 here 72 strips
#define NUM_LEDS_PER_STRIP (3 * 123)//the length of your strip if you have different strips size put here the longuest strip
//#define MULTIPLE_LEDSBUFFER //use the mode several leds buffers in that mode the number of NBIS2SERIALPINS has to be <=12
#define STATIC_COLOR_GRB 1
#define USE_FASTLED //te enable the needed types
#include "FastLED.h"
@hpwit
hpwit / pannel2.ino
Created December 28, 2020 22:08
pannel2.ino
#include <ArtnetESP32.h>
#include "FastLED.h"
FASTLED_USING_NAMESPACE
//The following has to be adapted to your specifications
#define LED_WIDTH 54
#define LED_HEIGHT 37
@hpwit
hpwit / testvirtualdriver.ino
Created December 18, 2020 09:55
testvirtualdriver.ino
//#define ESP32_VIRTUAL_DRIVER true //To enable virtual pin driver for esp32
//#define ESP_VIRTUAL_DRIVER_8 1 //to use the 8:1 ratio
//#define FULL_DMA_BUFFER
#define NBIS2SERIALPINS 9 //number of esp32 pins you will use. the total number of strips available will be NBIS2SERIALPINS * 8 here 72 strips
#define NUM_LEDS_PER_STRIP 900 //the length of your strip if you have different strips size put here the longuest strip
#define MULTIPLE_LEDSBUFFER //use the mode several leds buffers in that mode the number of NBIS2SERIALPINS has to be <=12
#define STATIC_COLOR_GRB 1
#define USE_FASTLED //te enable the needed types
#include "FastLED.h"
@hpwit
hpwit / tes_1.ino
Last active November 13, 2020 14:47
tes_1.ino
#define ESP32_VIRTUAL_DRIVER true //To enable virtual pin driver for esp32
#define ESP_VIRTUAL_DRIVER_8 1 //to use the 8:1 ratio
#define NBIS2SERIALPINS 8 //number of esp32 pins you will use. the total number of strips available will be NBIS2SERIALPINS * 8 here 56 strips
#define NUM_LEDS_PER_STRIP 1080 //the length of your strip if you have different strips size put here the longuest strip
/*
the lines above needs to be declared before #include "FastLed.h"
NBIS2SERIALPINS represents the number of pins used by the esp value, it ranges from 1->15
NUM_LEDS_PER_STRIP the length of your strip if you have different strips size put here the longuest strip
for each pin you would be able to drive 8 virtuals pins
@hpwit
hpwit / test.ino
Last active November 6, 2020 15:45
test.ino
#define ESP32_VIRTUAL_DRIVER true //To enable virtual pin driver for esp32
#define NBIS2SERIALPINS 18
/*
This needs to be declared before #include "FastLed.h"
NBIS2SERIALPINS represent the number of pins used by the esp value, it ranges from 1->20
for each pin you would be able to drive 5 virtuals pins
i.e for
#define NBIS2SERIALPINS 8
You will be able to drive up to 8*5=40 pins
@hpwit
hpwit / e131.ino
Last active October 6, 2020 02:45
#include <ESPAsyncE131.h>
#include "FastLED.h"
#define UNIVERSE 1 // First DMX Universe to listen for
#define UNIVERSE_COUNT 14 // Total number of Universes to listen for, starting at UNIVERSE
const char ssid[] = "esp131"; // Replace with your SSID
const char passphrase[] = "LEDtest1"; // Replace with your WPA2 passphrase
byte vUniverse=0;
byte vCycle1=0,vMark1;
byte vCycle2=0,vMark2;
#include <WiFi.h>
//#include <ESP8266WiFi.h>
#include "SD.h"
#include "SPI.h"
//#include "FS.h"
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#include "esp_task_wdt.h"