Skip to content

Instantly share code, notes, and snippets.

@ggajoch
ggajoch / altium_modify.py
Created August 10, 2020 22:53
altium file modifier - remove text from pcblib
import os, struct, copy
import re
import pythoncom
from win32com.storagecon import *
import glob
import progressbar
from PcbLib.PcbLib import PcbLib
mode = STGM_READWRITE|STGM_SHARE_EXCLUSIVE|STGM_DIRECT
@ggajoch
ggajoch / do.ino
Created June 21, 2020 22:45
ogn arduino sensor
void setup()
{
Serial.begin(9600);
analogReference(INTERNAL);
delay(10); // wait a sec for the analog reference to stabilize
}
void loop()
{
@ggajoch
ggajoch / klipper.cfg
Last active February 21, 2021 08:31
typical config
# This file contains common pin mappings for the BIGTREETECH SKR mini
# E3 v1.2. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra
# low-level configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PC13".
# The "make flash" command does not work on the SKR mini E3. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the SKR
# mini E3 with that SD card.
@ggajoch
ggajoch / json_deserializer.cpp
Created November 28, 2018 20:34
Json deserializer
#include <cstdio>
#include <string>
#include <tuple>
#include <iostream>
#include <cassert>
#include <algorithm>
#include <cctype>
using namespace std;
/*
SD card datalogger
This example shows how to log data from three analog sensors
to an SD card using the SD library.
The circuit:
* analog sensors on analog ins 0, 1, and 2
* SD card attached to SPI bus as follows:
** MOSI - pin 11