Skip to content

Instantly share code, notes, and snippets.

@Hailong123-Qu
Hailong123-Qu / CANWorker.cpp
Created April 15, 2022 15:52 — forked from Arman92/CANWorker.cpp
CAN-Bus ECU reading with STM32F429 (STM32Fxxx)
#include "CANWorker.h"
#define CAN_BAUDRATE_TEST_TIMEOUT 10000 //ms
CAN_HandleTypeDef _canHandle;
bool receivedAnyCANFrame = false;
bool flag = false;
bool busy = false;
@Hailong123-Qu
Hailong123-Qu / KiCAD_CopperSpiral_v2.py
Created December 10, 2021 07:13 — forked from JoanTheSpark/KiCAD_CopperSpiral_v2.py
v2 with spin direction and increasing amount of segments per turn for smoother result in outer circles
import sys, os
import shutil
import math
import itertools
from copy import deepcopy
# 0 1 2 3 4 5 6
LIST_elmt = [" ("," (start ",") (end ",") "," (layer ",") ","))"]
#LIST_elmt = [" (gr_line (start 131.571908 182.314571) (end 112.874456 120.68499) (angle 90) (layer Dwgs.User) (width 0.1))"]
#LIST_elmt = [" (segment (start 118.7 106.7) (end 119.4 106.7) (width 0.25) (layer B.Cu) (net 0))"]
@Hailong123-Qu
Hailong123-Qu / Makefile
Created May 12, 2021 08:14 — forked from mrmekon/Makefile
Capacitive touch sensor via ADC (no external components)
all: default run
default:
msp430-gcc -I/usr/local/msp430-gcc-4.4.3/msp430/include/ captouch.c -save-temps -mendup-at=main -mmcu=msp430x2111 -Os
run:
mspdebug rf2500 "prog a.out"
dump:
mspdebug rf2500 "md 0x1000 256"
@Hailong123-Qu
Hailong123-Qu / Makefile
Created May 12, 2021 08:01 — forked from mrmekon/Makefile
MSP430 capacitive touch sensor with ADC and capacitor
all: default run
default:
msp430-gcc -I/usr/local/msp430-gcc-4.4.3/msp430/include/ captouch.c -save-temps -mendup-at=main -mmcu=msp430x2111 -Os
run:
mspdebug rf2500 "prog a.out"
dump:
mspdebug rf2500 "md 0x1000 256"