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
/*
*/
#pragma once
#include "esp_heap_caps.h"
#include "soc/soc.h"
#include <Arduino.h>
static TaskHandle_t FastLEDshowTaskHandle = 0;
static TaskHandle_t userTaskHandle = 0;
#include <dumbconfig.h>
//#include <dumbbt.h>
#include <BluetoothSerial.h>
BluetoothSerial Bluetooth;
I2SClocklessVirtualLedDriver driver;
void FastLEDshowESP32()
#ifndef dumbconfig_h // Contains settings for Myriad components
#define dumbconfig_h
/*
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 longest strip
for each pin you would be able to drive 8 virtuals pins
linked the 74hc595 with the strips
Q0/PIN 15 => VIRTUAL PIN 8
@hpwit
hpwit / Secondcore.ino
Created July 23, 2021 21:26
Secondcore
static TaskHandle_t FastLEDshowTaskHandle = 0;
static TaskHandle_t userTaskHandle = 0;
void FastLEDshowESP32()
{
if (userTaskHandle == 0) {
const TickType_t xMaxBlockTime = pdMS_TO_TICKS( 200 );
// -- Store the handle of the current task, so that the show task can
// notify it when it's done
@hpwit
hpwit / Test.ino
Created July 23, 2021 21:17
Second core
void FastLEDshowESP322()
{
if (userTaskHandle == 0) {
const TickType_t xMaxBlockTime = pdMS_TO_TICKS( 200 );
// -- Store the handle of the current task, so that the show task can
// notify it when it's done
// noInterrupts();
userTaskHandle = xTaskGetCurrentTaskHandle();
//lit correctement le fichier artnet enregistré sur la SD
//attention ce sketch n'allume pas les leds!
/*WiFi connected.
12:18:03.617 -> IP address:
12:18:03.617 -> 192.168.0.38
12:18:03.663 -> 16516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516516521683864228152864480500000240312516300000000000000001649613640000000000000000000000000000000000000000000000000000testSD_start
12:18:03.663 -> 0
12:18:03.663 -> testSD_end
12:18:03.663 -> Starting artnet with starting universe :0
12:18:03.663 -> Starting Artnet nbNee sdedUniverses:1
@hpwit
hpwit / algoscroll.c
Created May 7, 2021 14:07
algorithm
uint32_t offp,offi,x,y;
//printf("li%d:\n",line_width);
y=ledtodisp/line_width;
#if SNAKEPATTERN == 1
if(y%2 == 0)
{
x=ledtodisp%line_width;
// off=((x+startleds)%line_width)+y*line_width;
offi=MOD(x+startleds,line_width)+y*line_width;
#if ALTERNATEPATTERN == 1
@hpwit
hpwit / CodeAnimate.ino
Last active April 16, 2021 16:18
code for last-chance-cowboy
#include "FastLED.h"
#define NUM_LEDS 170
#define Data_Pin 12 //change according to th epin you use
#define chipset NEOPIXEL
#define NB_LETTERS 10
//Letter Class this may seem a bit more complex to set up but way easiuer to use
class Letter {
@hpwit
hpwit / examplecode.ino
Last active April 8, 2021 08:05
Example code for you
/*
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
linked the 74hc595 with the strips
Q0/PIN 15 => VIRTUAL PIN 8
Q1/PIN 1 => VIRTUAL PIN 7
@hpwit
hpwit / staticipartnet.ino
Created March 7, 2021 17:46
gist for artnet test with stain ip
#include <ArtnetESP32.h>
#include "FastLED.h"
FASTLED_USING_NAMESPACE
//The following has to be adapted to your specifications
#define NUM_LEDS 1020