Skip to content

Instantly share code, notes, and snippets.

@roboter
roboter / main.c
Created July 2, 2023 07:28
Nokia BluePill PCD8544
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
#include "gd32e232.h"
#include "systick.h"
// Speed 72MHz
// WB2812
// 0.35 µs == 350 ns
// 1 code HIGH 400 ns 800 ns +- 150ns
// 0 code HIGH 850 ns 450 ns +- 150ns
// RWA above 50µs
#define HAS_WIFI
using Iot.Device.Ssd13xx;
using nanoFramework.Hardware.Esp32;
using nanoFramework.Networking;
using System;
using System.Device.I2c;
using System.Diagnostics;
using System.Net;
using System.Net.Http;
@roboter
roboter / CP2112.cs
Created April 27, 2022 21:23 — forked from nickfox-taterli/CP2112.cs
CP2112 Example
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ClassFinder.Lib
open System
module ClassFinder =
Console.ReadLine() |> System.Int32.Parse |> fun x-> [1..x] |> List.iter (fun _ -> printfn "Hello World")
let isUpper c =
c |> Char.IsUpper
let toUpper c =
using System.Globalization;
using System.IO;
using System.Text;
namespace DrillBoardGcode
{
class Program
{
static double DRILLDEPTH = -4;
static double DRILLFEED = 5 * 60;
@roboter
roboter / spooldrawer.scad
Created May 7, 2020 15:30
Drawer from empty spool
/* Spool parts storage organizer
Based on https://www.thingiverse.com/thing:2793548 by hirez99
Frank van der Hulst drifter.frank@gmail.com
24 Feb 2018
This generates a drawer that can be fitted into an empty filament spool to
provide storage for small parts.
Holes need to be drilled in the sides of the spool for axles
A drill guide is provided to get the axle holes in the right places on the spool.
Axles are provided using tbuser's Pin Connectors V2 library https://www.thingiverse.com/thing:10541
@roboter
roboter / gear.scad
Created May 1, 2020 13:05
OpenSCAD module for simple gears with round teeth
$fn = 50;
color("yellow") rotate(90-$t*360/15) gear(4, 10);
module gear(teeth, step, height=8) {
angle = 360/(teeth*2);
radius = (step/2) / sin(angle/2);
apothem = (step/2) / tan(angle/2);
module circles() {
for (i = [1:teeth])
var lose = 0;
var win = 0;
var total = 0;
while (true)
{
Console.WriteLine("Heads (0) or Tails (1)");
var user = Console.ReadLine();
@roboter
roboter / drawer.scad
Created October 13, 2019 13:43
Spool drawer
/* Spool parts storage organizer
Based on https://www.thingiverse.com/thing:2793548 by hirez99
Frank van der Hulst drifter.frank@gmail.com
24 Feb 2018
This generates a drawer that can be fitted into an empty filament spool to
provide storage for small parts.
Holes need to be drilled in the sides of the spool for axles
A drill guide is provided to get the axle holes in the right places on the spool.
Axles are provided using tbuser's Pin Connectors V2 library https://www.thingiverse.com/thing:10541