Skip to content

Instantly share code, notes, and snippets.

View jimf99's full-sized avatar

JimFyyc jimf99

  • -na-
  • YYC = Calgary Alberta Canada airport code
View GitHub Profile
@jimf99
jimf99 / SampleGuidance.ino
Created May 28, 2024 05:14 — forked from hugodahl/SampleGuidance.ino
Idea on Guidance for HugoBot in Arduino (semi-pseudo code)
#include "MeMegaPi.h"
#include "Arduino.h"
#include "SoftwareSerial.h"
// Define the pins/outputs that map to the individual motors
#define WHEEL_LF = PORT2B // Set to the pin for LEFT FRONT wheel
#define WHEEL_RF = PORT1A // Set to the pin for RIGHT FRONT wheel
#define WHEEL_LR = PORT2A // Set to the pin for LEFT REAR wheel
#define WHEEL_RR = PORT1B // Set to the pin for RIGHT REAR wheel
@jimf99
jimf99 / client.js
Created October 26, 2023 14:13 — forked from aerrity/client.js
Node, Express & MongoDB: Button click example
console.log('Client-side code running');
const button = document.getElementById('myButton');
button.addEventListener('click', function(e) {
console.log('button was clicked');
fetch('/clicked', {method: 'POST'})
.then(function(response) {
if(response.ok) {
console.log('click was recorded');
@jimf99
jimf99 / maidenhead.py
Created June 13, 2023 20:24 — forked from laemmy/maidenhead.py
Convert latitude and longitude to Maidenhead grid locators.
# -*- coding: utf-8 -*-
import sys
# Convert latitude and longitude to Maidenhead grid locators.
#
# Arguments are in signed decimal latitude and longitude. For example,
# the location of my QTH Palo Alto, CA is: 37.429167, -122.138056 or
# in degrees, minutes, and seconds: 37° 24' 49" N 122° 6' 26" W
#