Skip to content

Instantly share code, notes, and snippets.

@darkxst
darkxst / rules.txt
Last active May 29, 2024 21:04 — forked from denniskupec/rules.txt
KiCad DRC rules for JLCPCB, 2 & 4-layer PCB
(version 1)
#Kicad 7
# 2-layer, 1oz copper
(rule "Minimum Trace Width (outer layer)"
(constraint track_width (min 5mil))
(layer outer)
(condition "A.Type == 'track'"))
(rule "Minimum Trace Spacing (outer layer)"
@dreamcat4
dreamcat4 / aixun-t3a-openocd.steps.md
Last active December 15, 2023 19:53
openocd stlinkv2 - connecting to aixun t3a swd debugging port

Connect aixun 3ta over SWD pins / stlinkv2

This instructions covers how to connect via openocd on linux platform. And assuming you have the STLINKv2 hardware dongle. And that you have wired it up correctly, to the aixun t3a's debugging port.

NOTE:

  • Case 1) The swd debugging port should normally only be connected up between your PC and the soldering station. When the target device (the aixun t3a) is fully powered off, and it's mains cable unplugged from the outlet. To avoid having dual powering (both connected), or to avoid grounding / reference issues.
  • Case 2) However for live debugging scenarios, or working on firmwares etc. Then you typically would instead disconnect the +3v3 power pin from the SWD port on the STLINKv2. And just tie the GNDs together. To keep the ground reference only. Then have the target DUT (the mcu in the aixun) being powered independantly by itself. Just being aware that this is more risky or delicate situation than when passively powering from the STLINKv2 in the safer
@thaJeztah
thaJeztah / index.md
Last active January 8, 2024 12:06
Ubuntu or Alpine? A quick comparison

Ubuntu ... or Alpine? A quick comparison

Let's see how they compare with a minimal example: run an image that installs curl and pulls the Holberton homepage

Ubuntu

Pull the ubuntu:16.04 image

@netom
netom / spectrum.py
Last active July 24, 2023 21:51
Simple spectrum analyzer in python using pyaudio and matplotlib
#!/usr/bin/env python
# -*- charset utf8 -*-
import pyaudio
import numpy
import math
import matplotlib.pyplot as plt
import matplotlib.animation
RATE = 44100
@kraftb
kraftb / I2C_Adapter.ino
Created May 19, 2015 15:31
USB to I2C Adapter using Arduino
// I2C to USB Adapter using Arduino
// by Bernhard Kraft <kraftb@think-open.at>
/**
* This sketch can get loaded onto an Arduino to use it as USB to I2C Adapter.
* It uses the Wire library. So take a look at the documentation of the Wire
* libarary about the pins being used as SDA/SCL. For most Arduino boards this
* will be analog input pin 4 for SDA and analog input pin 5 for SCL.
*
* On the USB side the default serial link of the Arduino is used. A protocol
@gordonjcp
gordonjcp / gist:8158896
Last active August 21, 2023 16:11
How to build for arduino with avr-gcc using a Makefile
# simple makefile for avr-gcc projects
# what is the final binary called
PROGRAM = ddsvfo
# flags to pass to the C compiler
# -mmcu should be set to the CPU type
# -DF_CPU should be the clock speed in Hz
# you can add additional -D statements which work just like #define in the code
CFLAGS = -Wall -I. -g -Os -mmcu=atmega168 -DF_CPU=16000000