Skip to content

Instantly share code, notes, and snippets.

View d3lta-v's full-sized avatar
🏠
Working from home

Pan Ziyue d3lta-v

🏠
Working from home
  • FourierIndustries LLP
  • Singapore
View GitHub Profile
@d3lta-v
d3lta-v / SSTuinoClassic_Classroom.ino
Created April 28, 2022 02:39
Classroom temperature and humidity IoT monitoring sensor
/*
Classroom Temperature and Humidity Monitoring Program
For the SSTuino Classic
This example sketch publishes temperature and humidity data
from a DHT11 sensor to ThingSpeak every 20 seconds using MQTT.
This example code is in the public domain.
@d3lta-v
d3lta-v / rspillegal-3-arduino_cli.txt
Created February 26, 2022 07:30
Investigation of failure to flashing a program to a JTAG2UPDI ATmega4809 through a MuxTO based SAMD11 - part 3
$ arduino-cli compile --upload -p $DEVICE --fqbn "MegaCoreX:megaavr:4809:pinout=uno-wifi" --build-property clock=internal_16MHz --build-property bootloader=no_bootloader --build-property BOD=2v6 SerialNINAPassthrough
Sketch uses 3428 bytes (6%) of program storage space. Maximum is 49152 bytes.
Global variables use 323 bytes (5%) of dynamic memory, leaving 5821 bytes for local variables. Maximum is 6144 bytes.
"/Users/panziyue/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18/bin/avrdude" "-C/Users/panziyue/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.0.8/avrdude.conf" -v -V -patmega4809 -cjtag2updi -P/dev/cu.usbmodem14101 -e "-Uflash:w:/private/var/folders/dx/mwn31wlj3db_q1112jfbg5qc0000gn/T/arduino-sketch-04E22168BB4D031D6D209DA77BD741B7/SerialNINAPassthrough.ino.hex:i" "-Ufuse0:w:0x00:m" "-Ufuse1:w:0x54:m" "-Ufuse2:w:0x01:m" "-Ufuse4:w:0x00:m" "-Ufuse5:w:0xC9:m" "-Ufuse6:w:0x06:m" "-Ufuse7:w:0x00:m" "-Ufuse8:w:0x00:m" "-Ulock:w:0xC5:m" -vvvv
avrdude: Version 6.3-20201216
@d3lta-v
d3lta-v / rspillegal-2-arduino_cli.txt
Created February 26, 2022 07:29
Investigation of failure to flashing a program to a JTAG2UPDI ATmega4809 through a MuxTO based SAMD11 - part 2
$ arduino-cli compile --upload -p $DEVICE --fqbn "MegaCoreX:megaavr:4809:pinout=uno-wifi" --build-property clock=internal_16MHz --build-property bootloader=no_bootloader --build-property BOD=2v6 SerialNINAPassthrough
Sketch uses 3428 bytes (6%) of program storage space. Maximum is 49152 bytes.
Global variables use 323 bytes (5%) of dynamic memory, leaving 5821 bytes for local variables. Maximum is 6144 bytes.
"/Users/panziyue/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18/bin/avrdude" "-C/Users/panziyue/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.0.8/avrdude.conf" -v -V -patmega4809 -cjtag2updi -P/dev/cu.usbmodem14101 -e "-Uflash:w:/private/var/folders/dx/mwn31wlj3db_q1112jfbg5qc0000gn/T/arduino-sketch-04E22168BB4D031D6D209DA77BD741B7/SerialNINAPassthrough.ino.hex:i" "-Ufuse0:w:0x00:m" "-Ufuse1:w:0x54:m" "-Ufuse2:w:0x01:m" "-Ufuse4:w:0x00:m" "-Ufuse5:w:0xC9:m" "-Ufuse6:w:0x06:m" "-Ufuse7:w:0x00:m" "-Ufuse8:w:0x00:m" "-Ulock:w:0xC5:m" -vvvv
avrdude: Version 6.3-20201216
@d3lta-v
d3lta-v / rspillegal-1-arduino_ide.txt
Created February 26, 2022 07:28
Investigation of failure to flashing a program to a JTAG2UPDI ATmega4809 through a MuxTO based SAMD11 - part 1
/Users/panziyue/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18/bin/avrdude -C/Users/panziyue/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.0.8/avrdude.conf -v -patmega4809 -cjtag2updi -P/dev/cu.usbmodem14101 -e -Uflash:w:/var/folders/dx/mwn31wlj3db_q1112jfbg5qc0000gn/T/arduino_build_346873/SerialNINAPassthrough.ino.hex:i -Ufuse0:w:0x00:m -Ufuse1:w:0xF4:m -Ufuse2:w:0x01:m -Ufuse4:w:0x00:m -Ufuse5:w:0xC9:m -Ufuse6:w:0x06:m -Ufuse7:w:0x00:m -Ufuse8:w:0x00:m -Ulock:w:0xC5:m -vvvv
avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/panziyue/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.0.8/avrdude.conf"
User configuration file is "/Users/panziyue/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
@d3lta-v
d3lta-v / no-rsp-illegal.txt
Created February 25, 2022 12:10
What happens when a normal (non-bricked) board receives commands from avrdude
avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/panziyue/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.0.8/avrdude.conf"
User configuration file is "/Users/panziyue/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbmodem14101
Using Programmer : jtag2updi
@d3lta-v
d3lta-v / rsp-illegal.txt
Created February 25, 2022 11:46
avrdude -vvvv output after an ATmega4809 is bricked by arduino-cli
avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/panziyue/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.0.8/avrdude.conf"
User configuration file is "/Users/panziyue/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbmodem14101
Using Programmer : jtag2updi
@d3lta-v
d3lta-v / Apple ][+ PSU Replacement.md
Created December 29, 2021 02:10
My build log of the ReactiveMicro PSU replacement.

Apple ][+ PSU Replacement

I recently completed a PSU replacement using the ReactiveMicro Universal PSU kit on an 1982 Apple ][+ unit. This is the build log of replacing the old PSU with the new one, as the old one was too aged and only accepted 120V AC (I live in a country that supplies 240V AC). This build log is a complement (not replacement) to the original ReactiveMicro Guide.

1: Modifying the baseplate

image

Detach the right side of the baseplate. This is the expected position of the PSU on the baseplate, but don't fasten the screws yet.

/*
LoRa Simple Client for Arduino :
Support Devices: LoRa Shield + Arduino
It is designed to Send data to Ddragino LG01-P
User need to use the modified RadioHead library from:
https://github.com/dragino/RadioHead
modified 11/12/2018
by Jason Lau
;*******************************************************************************
; *
; Microchip licenses this software to you solely for use with Microchip *
; products. The software is owned by Microchip and/or its licensors, and is *
; protected under applicable copyright laws. All rights reserved. *
; *
; This software and any accompanying information is for suggestion only. *
; It shall not be deemed to modify Microchip?s standard warranty for its *
; products. It is your responsibility to ensure that this software meets *
; your requirements. *

Hardening Windows 10

This is a practical guide for hardening installations of Windows 10 for home use. This is derived from Hardening Windows 10 for Security which is an enterprise-style hardening guide.

Phase 0: Installation

During the installation and setup of Windows 10, there may be some questions the OS presents the user with. Not all of them are beneficial and some of them intentially track the user. The steps are listed below:

  1. Choose your language
  2. Choose the keyboard
  3. Add a second keyboard layout SKIP