Skip to content

Instantly share code, notes, and snippets.

View dadecoza's full-sized avatar

Johannes le Roux dadecoza

View GitHub Profile
@dadecoza
dadecoza / EEPROM Test
Created May 9, 2024 15:15
Arduino EEPROM Test
// Flashing LED indicates an error
#include <EEPROM.h>
unsigned char fillchar = 0xFF;
int fault = 0;
void setup() {
pinMode(13, OUTPUT);
// put your setup code here, to run once:
@dadecoza
dadecoza / BENADV.BAS
Created March 3, 2024 22:07
Ben Heck's Island Adventure
1 DIM LC$(100),RE$(500),P$(100),DA(255)
2 DIM VERB$(40),NOUN$(40),N$(3),V$(3),I$(100)
3 LOC1=6:LOC2=36:LOC3=27:LOC4=24:L1=33:L2=30:L3=11:L4=17:L5=36:L6=28:L7=7
4 REM
5 REM
6 R=1:VERB$="TAKDROEXAINSPUSPULHITOPECLOCUTBURSUB":NOUN$="MATRODDYNKNICANROCBOUHANCORPLUWAL"
7 D1=0:D2=0:D3=0:D4=0:D5=0
8 REM
10 REM ISLAND ADVENTURE
12 REM BY BEN HECKENDORN
@dadecoza
dadecoza / hellorld.lst
Created October 24, 2023 19:52
hellorld.lst
0000 1 ORG 0x1800
1800 dd 21 50 18 2 START LD IX, 0x1850 ; Display register text string starts at 0x183C
1804 3e 11 3 LD A, 0x11 ; Length of text string
1806 32 20 18 4 LD (0x1820), A ; Stick that into scratch memory at 0x1820
1809 cd 24 06 5 CALL 0x0624 ; Display what IX points to
180c cd 21 18 6 CALL 0x1821 ; CALL the pause loop
180f 3a 20 18 7 LD A, (SCRATCH) ; Pull string position pointer in from memory
1812 3d 8 DEC A ; Decrease text string pointer
1813 32 20 18 9 LD (0x1820), A ; Save it in memory
1816 ca 00 18 10 JP Z, START ; If Text string pointer is zero redo from start
ORG 0x1800
INIT LD IY, DATA ; IY points to the video data start address
DISP LD A, (IY) ; load byte of data from memory
OR A ; null termination?
JR Z, DONE ; if so, then we are done
CALL VDP ; call the VDP subroutine to write the byte to the VDP
INC IY ; increment IY to move to next byte
JR DISP ; loop back to display
DONE HALT ; nothing more to do!
VDP PUSH BC ; start of VDP subroutine ... copy BC to the stack for save keeping
@dadecoza
dadecoza / STAR.BAS
Last active December 13, 2022 16:06
10 REM @DADECOZA
20 LET Y=5
30 REM TOP
40 FOR A=1 TO Y
50 FOR B=1 TO Y
60 PRINT " ";
70 NEXT B
80 FOR B=1 TO A
90 PRINT "*";
100 NEXT B
@dadecoza
dadecoza / Horse.ino
Created April 8, 2018 10:36
Animated Horse for Arduino with 16x2 LCD display. There are 3 frames and 8 custom characters per frame.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // LiquidCrystal Library - Example Pinouts
//LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // LCD Keypad Shield Pinouts
int x = 0;
byte chr[3][8][8] = {
{
{0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0E, 0x0E},
@dadecoza
dadecoza / password_from_cyberark.py
Last active May 31, 2024 20:10
Python Script for Retrieving Password from CyberArk (9.9.5) Password Vault
import requests
class RetrieveCyberArkPassword:
def __init__(self, url, username, password, verify_ssl=True):
self.username = username
self.password = password
self.cyberark_url = url
self.cert = None
@dadecoza
dadecoza / KeypadCalibrate.ino
Last active July 8, 2016 09:09
This sketch will calibrate and generate an example sketch for reading the Arduino LCD Keypad Shiled.
#define SELECT 0
#define LEFT 1
#define UP 2
#define DOWN 3
#define RIGHT 4
int buttonVals[5];
int orderedVals[5];
String label[] = {"SELECT", "LEFT", "UP", "DOWN", "RIGHT"};
@dadecoza
dadecoza / LCD_Game.ino
Created July 4, 2016 06:46
Side scrolling one button jump game for the Arduino LCD Keypad shield.
/* Modified slightly to work with the LCD Keypad Shield.
* Original - http://www.instructables.com/id/Arduino-LCD-Game/
*/
#include <LiquidCrystal.h>
#define SPRITE_RUN1 1
#define SPRITE_RUN2 2
#define SPRITE_JUMP 3
#define SPRITE_JUMP_UPPER '.' // Use the '.' character for the head
#define SPRITE_JUMP_LOWER 4