Skip to content

Instantly share code, notes, and snippets.

View sutaburosu's full-sized avatar
🤯

sutaburosu sutaburosu

🤯
  • UK
  • 16:51 (UTC)
View GitHub Profile
@sutaburosu
sutaburosu / sexta.py
Created February 2, 2021 12:09
Alternative build server for wokwi.com
#!/usr/bin/env python3
'''
## Installation
# Windows
Install [Python 3](https://www.python.org/downloads/), then continue with the
[All operating systems](#allOS) section.
# Gentoo Linux
@sutaburosu
sutaburosu / stream_serial.ino
Last active September 23, 2024 01:43
A tool to stream from Wokwi's Arduino sim to real LEDs. Optimised for AVR Arduinos with CH340 USB serial
#include <stdarg.h>
#include <FastLED.h>
#define LED_TYPE WS2812B
#define DATA_PIN 2
#define COLOR_ORDER GRB
#define XY_WIDTH 16
#define XY_HEIGHT 16
#define XY_LAYOUT (SERPENTINE | ROWMAJOR)
#define BRIGHTNESS 16
@sutaburosu
sutaburosu / metaballs.ino
Last active February 26, 2024 13:33
Take a sqrt() per-pixel? Hold my bitshifts and adds.
//Metaballs
//16x16 rgb led matrix demo
//Yaroslaw Turbin 20.07.2020
//https://vk.com/ldirko
//https://www.reddit.com/user/ldirko/
#include "FastLED.h"
// Matrix size
#define NUM_ROWS 16
#define NUM_COLS 16
@sutaburosu
sutaburosu / recv_processing.ino
Last active May 23, 2021 15:27
Simple streaming from Processing to FastLED at ~50 FPS for 256 LEDs
#include <FastLED.h>
#include <colorutils.h>
enum XY_matrix_config {LINEAR = 0, SERPENTINE = 1, COLUMNMAJOR = 0, ROWMAJOR = 2, FLIPMAJOR = 4, FLIPMINOR = 8};
#define BRIGHTNESS 32
#define LED_PIN 2
#define COLOR_ORDER GRB
#define CHIPSET WS2812B
#define kMatrixWidth 16
#define kMatrixHeight 16
@sutaburosu
sutaburosu / cakeday_hack_8x32.ino
Last active February 26, 2024 13:34
An 8x32 variant of the leaping dots thing for u/tomchaps
// by <[email protected]>
// License: Creative Commons CC0
#include <Arduino.h>
#include <FastLED.h>
#include <colorutils.h>
enum XY_matrix_config {
SERPENTINE = 1,
ROWMAJOR = 2,
@sutaburosu
sutaburosu / flexible_XY_mapper.ino
Last active June 17, 2020 11:30
A more flexible XY() mapping function for FastLED
#define kMatrixWidth 16
#define kMatrixHeight 16
#define kMatrixSerpentine true
#define kMatrixRowMajor true
#define kMatrixFlipMajor true
#define kMatrixFlipMinor false
#define NUM_LEDS ((kMatrixWidth) * (kMatrixHeight))
CRGB leds[NUM_LEDS + 1]; // 1 extra for XY() to use when out-of-bounds
@sutaburosu
sutaburosu / cakeday_hack.ino
Last active April 27, 2023 19:51
Sub-pixel resolution is kinda essential for 16x16 displays.
// by <[email protected]>
// License: Creative Commons CC0
#include <Arduino.h>
#include <FastLED.h>
#include <colorutils.h>
#define BRIGHTNESS 64
#define LED_PIN 2
#define COLOR_ORDER GRB