Skip to content

Instantly share code, notes, and snippets.

View witnessmenow's full-sized avatar

Brian Lough witnessmenow

View GitHub Profile
@witnessmenow
witnessmenow / PatternPlasmaMLE.ino
Last active July 28, 2020 09:03
Testing a virtual display buffer
/*
* Portions of this code are adapted from Aurora: https://github.com/pixelmatix/aurora
* Copyright (c) 2014 Jason Coon
*
* Portions of this code are adapted from LedEffects Plasma by Robert Atkins: https://bitbucket.org/ratkins/ledeffects/src/26ed3c51912af6fac5f1304629c7b4ab7ac8ca4b/Plasma.cpp?at=default
* Copyright (c) 2013 Robert Atkins
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
// adafruit_gfx_memory
//
// Example sketch which shows how to display an
// animated GIF image stored in FLASH memory
// using the Adafruit_GFX_TFT library
//
// written by Larry Bank
// bitbank@pobox.com
//
// To display a GIF from memory, a single callback function
@witnessmenow
witnessmenow / List_SPIFFS.h
Last active July 16, 2020 07:09
Spotify TJpg POC - a demo of displaying album art on a matrix
/***************************************************************************************
** Function name: listSPIFFS
** Description: Listing SPIFFS files
***************************************************************************************/
#ifdef ESP8266
void listSPIFFS(void) {
Serial.println(F("\r\nListing SPIFFS files:"));
fs::Dir dir = SPIFFS.openDir("/"); // Root directory
@witnessmenow
witnessmenow / TpPlayShieldDisplay.ino
Created July 4, 2020 12:33
Simple TinyPico Play shield example just for display
#include <TinyPICO.h>
#include <SPI.h>
#include <Wire.h>
#include <WiFi.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
const uint8_t PROGMEM TP_Logo[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@witnessmenow
witnessmenow / forTheCPP.cpp
Created June 7, 2020 13:38
UniversalTelegramAPI library get fix
// Untested!
// Replace the same method in UniversalTelegramBot.cpp
String UniversalTelegramBot::sendGetToTelegram(String command) {
String body = "";
String headers = "";
long now;
bool responseReceived = false;
// Connect with api.telegram.org if not already connected
// Create a new google Sheet, go to Tools -> Script Editor
// Info for setting it up on a timer here:
// https://www.quora.com/How-can-I-periodically-run-a-Google-Script-on-a-Spreadsheet
//If you don't want to use Telegram, just comment out line 38
function pullJSON() {
//var ss = SpreadsheetApp.getActiveSpreadsheet();
//var sheets = ss.getSheets();
@witnessmenow
witnessmenow / PatternPlasma.ino
Last active October 19, 2019 21:10
Using I2S
/*
* Portions of this code are adapted from Aurora: https://github.com/pixelmatix/aurora
* Copyright (c) 2014 Jason Coon
*
* Portions of this code are adapted from LedEffects Plasma by Robert Atkins: https://bitbucket.org/ratkins/ledeffects/src/26ed3c51912af6fac5f1304629c7b4ab7ac8ca4b/Plasma.cpp?at=default
* Copyright (c) 2013 Robert Atkins
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
@witnessmenow
witnessmenow / PixelTimeAnalog.ino
Last active September 25, 2019 19:09
PixelTimeAnalog
#include <PxMatrix.h>
#ifdef ESP32
#define P_LAT 22
#define P_A 19
#define P_B 23
#define P_C 18
#define P_D 5
@witnessmenow
witnessmenow / FallingSandRGBMatrix.ino
Created August 12, 2019 23:14
Falling Sand project for RGB matrix with a MPU6050 acceloremeter
// WIP!!!
//--------------------------------------------------------------------------
// Animated 'sand' for Adafruit Feather. Uses the following parts:
// - Feather 32u4 Basic Proto (adafruit.com/product/2771)
// - Charlieplex FeatherWing (adafruit.com/product/2965 - any color!)
// - LIS3DH accelerometer (2809)
// - 350 mAh LiPoly battery (2750)
// - SPDT Slide Switch (805)
//
@witnessmenow
witnessmenow / echoBotNina.ino
Created July 9, 2019 15:11
EchoBot with WiFiNINA
/*
This example creates a client object that connects and transfers
data using always SSL.
It is compatible with the methods normally related to plain
connections, like client.connect(host, port).
Written by Arturo Guadalupi
last revision November 2015