Skip to content

Instantly share code, notes, and snippets.

@lopespm
lopespm / arduino_keypad_using_2_columns_from_scratch.ino
Created February 24, 2025 00:03
Using a arduino keypad module from scratch, without using extra libraries. In this case, two columns are targeted. This gist is a complement to https://youtu.be/1iPnFEWHnqo, where this is explained
// Using a a arduino keypad module from scratch, without using extra libraries.
// In this case, two columns are targeted
// This gist is a complement to https://youtu.be/1iPnFEWHnqo, where this is explained
int pinSource1 = 3;
int pinSource2 = 4;
int pinReceiver1 = 9;
int pinReceiver2 = 8;
int pinReceiver3 = 7;
int pinReceiver4 = 6;
@lopespm
lopespm / arduino_keypad_using_1_column_from_scratch.ino
Last active February 24, 2025 00:30
Using a arduino keypad module from scratch, without using extra libraries. In this case, one columns is targeted. This gist is a complement to https://youtu.be/1iPnFEWHnqo, where this is explained
// Using a a arduino keypad module from scratch, without using extra libraries.
// In this case, one columns is targeted.
// This gist is a complement to https://youtu.be/1iPnFEWHnqo, where this is explained
int pinSource = 3;
int pinReceiver1 = 9;
int pinReceiver2 = 8;
int pinReceiver3 = 7;
int pinReceiver4 = 6;
#!/usr/bin/env bash
# Converts all .png/.jpg/.jpeg files under source/files/ to .webp
# Skips conversion if the .webp already exists and is newer than the source file.
set -euo pipefail
SEARCH_DIR="$(dirname "$0")/some_sub_folder"
find "$SEARCH_DIR" -type f \( -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" \) | while IFS= read -r src; do
basename=$(basename "$src")