Skip to content

Instantly share code, notes, and snippets.

View Staars's full-sized avatar

Christian Baars Staars

View GitHub Profile
@Staars
Staars / ov02c10.be
Last active March 7, 2026 16:52
Attempt to support a camera sensor just from the specs
# in preinit.be: load("/ov02c10.be")
class CSI_Sensor
var name
var wire
var addr
static REG_END = 0xFFFF
static REG_DELAY = 0xFFFE
def init(name, addr)
@Staars
Staars / gl_test.html
Created February 25, 2026 12:52
GL analyzer
<!DOCTYPE html>
<html><head><meta charset='utf-8'><title>16-Band Visualizer</title>
<style>body{margin:0;overflow:hidden;background:#000}canvas{display:block}</style>
</head><body>
<canvas id='c'></canvas><script>
// ================================================================
// TUNING
var AMP = 2.75; // wave height multiplier (try 1.0 .. 5.0)
var SPEED = 5.6; // scroll rate rad/s (try 0.1 .. 2.0)
var HZ = 50; // input packet rate Hz (50=dev 5x, 10=real)
@Staars
Staars / guition_es8311.be
Last active February 20, 2026 17:42
Audio codec driver for GUITION JC1060P470
# ES8311 Audio Codec Driver for Berry
# HW: GUITION JC1060P470, may work with the ESP32P4-EV too
# pa_power pin GPIO 20
class ES8311
var i2c
var pa_pin
def init(pa_pin)
@Staars
Staars / DMA_test.txt
Created October 27, 2025 17:53
save for later
#ifndef _UDISPLAY_SPI_CONTROLLER_H_
#define _UDISPLAY_SPI_CONTROLLER_H_
#include <Arduino.h>
#include <SPI.h>
#ifdef ESP32
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "esp32-hal-spi.h"
@Staars
Staars / lvgl_bench.be
Last active October 25, 2025 14:54
gather some ideas
class LVGLBenchmark
var scr, hres, vres
var test_running, current_test, frame_count, start_time, test_duration
var status_label, test_objects, results, anim_counter, anim_loop
var font_small, font_normal, font_large
var header_height, result_line_height
var is_small_screen, is_large_screen, scale_factor
def init()
lv.start()
@Staars
Staars / radio_lvgl.be
Created October 23, 2025 05:09
just a mockup
#- Web Radio Player UI for Tasmota LVGL -#
#- Beautiful interface for streaming internet radio -#
class WebRadioPlayer
var scr
var hres
var vres
var stations
var current_station_idx
var volume
#- Dashboard for Tasmota -#
#- Beautiful tile-based smart home control -#
class HomeDashboard
var scr
var hres
var vres
var tiles
var devices
var header_height
@Staars
Staars / 2dots.be
Last active October 30, 2025 10:10
little game
# Two Dots for LVGL
class TwoDotsGame
var scr, layer
var grid, grid_size
var dot_objects
var score, moves, target_score, level
var score_label, moves_label, target_label
var hres, vres, dot_size, grid_start_x, grid_start_y, padding
var current_path, path_lines
@Staars
Staars / 2048.be
Last active October 30, 2025 08:55
little game
#- 2048 Game for Tasmota LVGL -#
#- Swipe to play -#
class Game2048
var scr
var grid
var tiles
var score
var best_score
var score_label
@Staars
Staars / weather_dash2.be
Created October 7, 2025 19:55
Apple Style Weather App
class APPLE_WEATHER_APP : Driver
var data_buffers
var update_index
var pending_widget
var current_values
var last_update
var hourly_forecast
var daily_forecast
static BUFFER_SIZE = 24