Skip to content

Instantly share code, notes, and snippets.

View remisarrailh's full-sized avatar

Rémi Sarrailh remisarrailh

View GitHub Profile
@remisarrailh
remisarrailh / matrixtest_fastled.ino
Created January 28, 2020 18:41
Neo Matrix test for M5 Atom (using FastLed)
// Adafruit_NeoMatrix example for single NeoPixel Shield.
// Scrolls 'Howdy' across the matrix in a portrait (vertical) orientation.
#include <Adafruit_GFX.h>
#include <FastLED.h>
#include <FastLED_NeoMatrix.h>
#include <Fonts/TomThumb.h>
#define PIN 27
#define mw 5
@remisarrailh
remisarrailh / matrixtest.ino
Created January 28, 2020 17:26
Neo Matrix test for M5 Atom
// Adafruit_NeoMatrix example for single NeoPixel Shield.
// Scrolls 'Howdy' across the matrix in a portrait (vertical) orientation.
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
#include <Fonts/TomThumb.h>
#ifndef PSTR
#define PSTR // Make Arduino Due happy
#endif
/*
FSWebServer - Example WebServer with SPIFFS backend for esp8266
Copyright (c) 2015 Hristo Gochkov. All rights reserved.
This file is part of the ESP8266WebServer library for Arduino environment.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
@remisarrailh
remisarrailh / code.py
Created January 21, 2020 15:58
Circuit Python MakerDiary nrf52840 Bluetooth RGB test
# CircuitPython RGB Color Picker Example
import board
import pulseio
from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.nordic import UARTService
from adafruit_bluefruit_connect.packet import Packet
from adafruit_bluefruit_connect.color_packet import ColorPacket
ble = BLERadio()
// Test code for Ultimate GPS Using Hardware Serial (e.g. GPS Flora or FeatherWing)
//
// This code shows how to listen to the GPS module via polling. Best used with
// Feathers or Flora where you have hardware Serial and no interrupt
//
// Tested and works great with the Adafruit GPS FeatherWing
// ------> https://www.adafruit.com/products/3133
// or Flora GPS
// ------> https://www.adafruit.com/products/1059
// but also works with the shield, breakout
#include <M5StickC.h>
#include <WiFi.h>
#include <WiFiClientSecure.h>
#include <WiFiMulti.h>
#include <PubSubClient.h>
#include <time.h>
#define BUTTON_PIN_BITMASK 0x4000000 // 2^26 in hex
RTC_DATA_ATTR int bootCount = 0;
@remisarrailh
remisarrailh / artnet_ollieollie2.pde
Created June 22, 2019 07:48
artnet_ollieollie2.pde
/*
* Pixel to ArtNet
*
*/
import java.awt.*;
import processing.serial.*;
import ch.bildspur.artnet.*; //Library Artnet
import com.dhchoi.CountdownTimer; //Library CountDownTimer
import com.dhchoi.CountdownTimerService;
// Retrieve description
description_raw = msg.payload.split("SUMMARY:");
var description = [];
description_raw.forEach(function (item, index) {
if(index !== 0){
description.push(item.split("\n")[0].trim());
}
});
// Retrieve date
[
{
"id": "e50cb0c0.87ac9",
"type": "tab",
"label": "Bot Discord",
"disabled": false,
"info": ""
},
{
"id": "64569321.c6707c",
[
{
"id": "e50cb0c0.87ac9",
"type": "tab",
"label": "Bot Discord",
"disabled": false,
"info": ""
},
{
"id": "64569321.c6707c",