Skip to content

Instantly share code, notes, and snippets.

View nickyonge's full-sized avatar
♥️
🦆

Nick Yonge nickyonge

♥️
🦆
View GitHub Profile
@nickyonge
nickyonge / settings.json - PlatformIO fuse buttons
Last active December 19, 2024 02:03
PlatformIO IDE VSCode toolbar buttons for "Set Fuses", "Upload, Build, and Set Fuses", and "Upload w/o Build, and Set Fuses"
[ see: https://community.platformio.org/t/made-set-fuses-and-upload-and-set-fuses-toolbar-commands/44795 ]
[ ... the rest of settings.json above ... ]
"platformio-ide.toolbar": [
[ ... other toolbar commands ... ]
{
"text": "$(flame)",
@nickyonge
nickyonge / ATtinyX4_pinmap_warnings.cpp
Last active October 19, 2024 00:26
Series of checks + warnings for PlatformIO when working with ATtiny84 platform, to ensure you're using the correct CW/CCW pinmapping
// Warnings to ensure ATtinyX4's Arduino pinmapping is defined correctly
#ifdef __AVR_ATtinyX4__ // ensure ATtinyX4 platform, proceed with warning checks
// SETUP: Uncomment ONE of the two definitions below to select the desired pinmapping:
#define USE_CW_PINMAPPING // this project uses CLOCKWISE (CW) pinmapping
// #define USE_CCW_PINMAPPING // this project uses COUNTERCLOCKWISE (CCW) pinmapping
#ifdef USE_CW_PINMAPPING
#ifdef USE_CCW_PINMAPPING
#error "Both CW and CCW pinmappings are specified - only one may be selected!"
@nickyonge
nickyonge / ATtinyX4_X5_pinout
Created October 18, 2024 02:22
ATtinyX4 / ATtinyX5 pinout description and graphic diagram, with links and resources
/* PINOUT DIAGRAMS FOR ATTINYX4 / ATTINYX5
ATtinyX4
.--------.
VCC [2.7-5.5V] - 1 =| O |= 14 - GND
10(0),X1,PCI8,PB0 - 2 =| |= 13 - 0(10),A0,PCI0,PA0
9(1),X2,PCI9,PB1 - 3 =| |= 12 - 1(9),A1,TXD,PCI1,PA1
RESET,11(11),PCI11,PB3 - 4 =| |= 11 - 2(8),A2,RXD,PCI2,PA2
8(2),INT0,PCI10,PB2 - 5 <| |= 10 - 3(7),A3,PCI3,PA3
7(3),A7,PCI7,PA7 - 6 <| |= 9 - 4(6),A4,SCK/SCL,PCI4,PA4
@nickyonge
nickyonge / platformio.ini
Last active March 12, 2024 19:15
WIP: ATtiny Platform.io INI Template
; PLATFORM.IO .ini TEMPLATE FOR ATTINYx4 ICs
; by Nick Yonge
; https://gist.github.com/nickyonge/69bf8889f9c26f0a6661cdb72e56620c
;
; Default values are all preselected, with commented-out sections for common modifications (eg clock customization)
; Look for the headlines, and just uncomment the sections as needed!
;
; Useful Resources:
; ATtiny 24/44/84 Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/doc8006.pdf
; confFUSE AVR Fuse Calculator: https://www.engbedded.com/conffuse/
@nickyonge
nickyonge / webpack.config.js
Last active June 13, 2024 16:15
webpack.js template - new sites, fast
/* WEBPACK TEMPLATE SETUP
* webpack.config.js
*
* All the steps for getting a new webpack-based website started via VS Code!
*
* This script itself is a file called webpack.config.js and is used to tell Webpack how to build your site.
* Start with the prerequisites below!
*
* --- PREREQUISITES ---
- Install VS Code, https://code.visualstudio.com
@nickyonge
nickyonge / helloworld.txt
Created November 30, 2022 02:30
"Hello World" text file for download tests
Hello, world!