Skip to content

Instantly share code, notes, and snippets.

#include <WiFi.h>
//#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <Artnet.h>
/*
* Connect the SD card to the following pins:
*
* SD Card | ESP32
* D2 -
@hpwit
hpwit / merge.ino
Last active August 18, 2018 13:01
#include <Adafruit_GFX.h>
#include <FastLED.h>
#include <FastLED_NeoMatrix.h>
#include <Wire.h> // must be included here so that Arduino library object file references work
#include <RtcDS1307.h>
RtcDS1307<TwoWire> Rtc(Wire);
#include <Adafruit_NeoPixel.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#define FASTLED_INTERRUPT_RETRY_COUNT 0
#include <FastLED.h>
#include <ArduinoOTA.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
/************ WIFI and MQTT INFORMATION (CHANGE THESE FOR YOUR SETUP) ******************/
#define wifi_ssid "*" //enter your WIFI SSID
//-------------------Set RTC-------------------------------------------------------
#include "time.h"
#include <BlynkSimpleEsp32.h>
const char* ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 3600;
const int daylightOffset_sec = 3600;
//------------------------------ WiFi details------------------------------
//-------------------Set RTC-------------------------------------------------------
#include "time.h"
const char* ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 3600;
const int daylightOffset_sec = 3600;
//------------------------------ WiFi details------------------------------
@hpwit
hpwit / savesdwithnumber.io
Last active August 31, 2018 13:22
save artnet on SD viaWifi with start/stop
#include <WiFi.h>
//#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <Artnet.h>
#define BLYNK_PRINT Serial
@hpwit
hpwit / wiwifsip.ino
Last active September 16, 2018 17:36
//**********************************************************************************************************//
// With this project its possible to drive Ws2812 Leds with Artnet over Wifi (with Jinx! or Glediator) //
// and it´s also possible to switch to the SD-card version where animations can be recorded from Artnet and //
// than be played back. Although a Matrix-clock can be switched on and off over the animations. //
// You will need the Fastled Library from Samguyer https://github.com/samguyer/FastLED //
// and the Artnet-library of Yves Bazin: https://github.com/hpwit/artnet //
// //
// Created by Stefan Weickinger & Yves BAZIN 2018 //
//**********************************************************************************************************//
@hpwit
hpwit / strip class.ino
Last active October 1, 2018 11:19
class for strips
//You would have a class define like this
class Strip
{
public:
CRGB *leds;
Strip(int num_leds);
void Comet(CRGB color);
void OTC(CRGB color);
void Ravel(CRGB color);
#define NUM_STRIPS 8
#define FastMask(MASK) ((MASK & 1) << 2 ) | ((MASK & 6) << 3 ) | ((MASK & 8) << 12 ) | ((MASK & 48) << 14 ) | ((MASK & 64) << 15 ) | ((MASK & 128) << 16 )
#define FASTLED_ALLOW_INTERRUPTS 0
#define INTERRUPT_THRESHOLD 1
#include "FastLED.h"
FASTLED_USING_NAMESPACE
#define FASTLED_SHOW_CORE 0
#define PORT_MASK 0b0101011001000000000110100
@hpwit
hpwit / fukkcode.ino
Created October 5, 2018 17:11
code with Yves's branch
// code by Mark Estes
// this version has audio input turned off unless you are specific matrix size
#include <SPI.h>
//#include <FastLED.h> //https://github.com/FastLED/FastLED
// Yves adds
#define NUM_STRIPS 16
//define NUM_STRIPS 20 //if you have 20 strips