Skip to content

Instantly share code, notes, and snippets.

View happytm's full-sized avatar
🏠
Working from home

happytm

🏠
Working from home
View GitHub Profile
@bitbank2
bitbank2 / gps_test.ino
Created August 20, 2022 13:39
Simplest possible program to capture GPS current time and location (no external dependencies for parsing NMEA strings)
//
// GP-02 GPS/BDS/GNSS module performance test
// tested with a ESP32-S2 module (USB CDC serial + exposed HW UART pins)
//
#include <OneBitDisplay.h>
ONE_BIT_DISPLAY obd;
uint8_t u8Flags;
#define FLAG_TIMEDATE 1
#define FLAG_POSITION 2
#include <RH_RF95.h>
#define RF95_CS 10
#define RF95_INT 2
#define RF95_RST 9
#define RF95_FREQ 915.0
RH_RF95 rf95(RF95_CS, RF95_INT);
@ggerganov
ggerganov / iss-docking.js
Created May 16, 2020 12:30
Automatic ISS Docking in Javascript
// Auto-pilot for docking with the International Space Station
//
// The program uses Artificial Intelligence and Decision Trees (i.e. basic kinematics and a bunch of if statements)
// to perform docking with the ISS from any starting position.
//
// To use it:
// - open the SpaceX simulation website: https://iss-sim.spacex.com/
// - open the Developer's console and paste the contents of this file
//
// Demo: https://youtu.be/jWQQH2_UGLw
@EEVblog
EEVblog / Arduino-IR-TX-NEC
Last active January 25, 2023 20:59
A simple Arduino driver for the NEC (Japanese) Infrared IR protocol. Drive an IR LED direct with your own code. This is a direct pin bit-bang approach, so beware about interrupts and timing difference between hardware. Feel free to use hardware PWM to generate the carrier frequency if you want better accuracy.
//*****************************************
// NEC (Japanese) Infrared code sending library for the Arduino
// Send a standard NEC 4 byte protocol direct to an IR LED on the define pin
// Assumes an IR LED connected on I/O pin to ground, or equivalent driver.
// Tested on a Freetronics Eleven Uno compatible
// Written by David L. Jones www.eevblog.com
// Youtube video explaining this code: http://www.youtube.com/watch?v=BUvFGTxZBG8
// License: Creative Commons CC BY
//*****************************************