Skip to content

Instantly share code, notes, and snippets.

@sillycowvalley
sillycowvalley / Configuration.local
Created October 4, 2025 03:17
Hopper 6502 Assembly configuration overrides for MECB 6502
{
"Hopper":
{
},
"Hopper 6502 Assembly":
{ "I2C": "true"
, "CPU_8MHZ": "false"
, "CPU_4MHZ": "true"
//, "CPU_2MHZ": "true"
, "W65C22_VIA": "false"
@sillycowvalley
sillycowvalley / ExploreFS.hs
Created December 11, 2024 22:01
Source for SD card demo
program ExploreFS
{
uses "/Source/Library/Boards/PimoroniTiny2350"
WalkDirectory(string folderPath, uint indent)
{
string indentString = ("").Pad(' ', indent);
IO.WriteLn(indentString + folderPath);
directory dir = Directory.Open(folderPath);
if (dir.IsValid())
@sillycowvalley
sillycowvalley / GarageBox.hs
Created December 5, 2024 19:07
Garage side of the garage door and driveway lights project
program GarageBox
{
//#define DIAGNOSTICS
uses "/Source/Library/Boards/ChallengerNB2040WiFi"
uses "/Source/Library/RTCs/DS3231Driver"
uses "/Source/Library/Devices/GenericRTC"
uses "/Source/System/DateTime"
@sillycowvalley
sillycowvalley / HouseBox.hs
Created December 5, 2024 19:07
House side of the garage door and driveway lights project
program HouseBox
{
//#define DIAGNOSTICS
uses "/Source/Library/Fonts/Verdana5x8"
uses "/Source/Library/Boards/ChallengerNB2040WiFi"
uses "/Source/Library/Devices/AdafruitEInk213TriColor"
bool lightsOn;
@sillycowvalley
sillycowvalley / RTCDemo.hs
Created December 4, 2024 02:27
Real time clock demo for DS3231 and DS3232
program RTCFeather
{
uses "/Source/Library/Boards/PiPico2"
uses "/Source/Library/RTCs/DS3232Driver"
uses "/Source/Library/Devices/GenericRTC" // can be used with any 'uses "<driver path>"
Hopper()
{
if (!RTCDevice.Begin())
@sillycowvalley
sillycowvalley / AmbientLog.hs
Created December 2, 2024 01:56
Logging ambient light to an SD card
program AmbientLog
{
#define DIAGNOSTICS
uses "/Source/Library/Boards/AdafruitFeatherRP2350Hstx"
uses "/Source/Library/Devices/AdafruitAdaloggerRTCSDFeatherwing"
uses "/Source/System/DateTime"
const string logPath = "/SD/Logs/Data.csv";
@sillycowvalley
sillycowvalley / ProximityEvent.hs
Created December 1, 2024 23:27
Using GPIO pin Events
program ProximityEvent
{
uses "/Source/Library/Boards/PiPicoW"
const byte sensorPin = GP16;
const byte ledPin = GP17;
long lightUntil = Time.Millis;
sensorEvent(byte pin, PinStatus status)
@sillycowvalley
sillycowvalley / Proximity.hs
Created December 1, 2024 23:26
Using PinMode, DigitalRead and DigitalWrite
program Proximity
{
uses "/Source/Library/Boards/PiPicoW"
const byte sensorPin = GP16;
const byte ledPin = GP17;
Hopper()
{
MCU.PinMode(sensorPin, PinModeOption.Input);
@sillycowvalley
sillycowvalley / Pico433Rx.hs
Created December 1, 2024 03:36
433MHz Receiver (echo)
program Pico433Rx
{
uses "/Source/Library/Boards/PiPicoW"
const byte ledPin = GP17;
Hopper()
{
string captured;
@sillycowvalley
sillycowvalley / Pico433Tx.hs
Created December 1, 2024 03:35
433Mhz Transmitter
program Pico433Tx
{
uses "/Source/Library/Boards/PiPicoW"
const byte ledPin = GP17;
Hopper()
{
PinMode(ledPin, PinModeOption.Output);