Skip to content

Instantly share code, notes, and snippets.

View russhughes's full-sized avatar

Russ Hughes russhughes

  • One World Telecommunications
View GitHub Profile
@sbright33
sbright33 / stepper2.ino
Created November 30, 2012 20:38
Stepper library for 28BYJ-48
// This Arduino example demonstrates bidirectional operation of a
// 28BYJ-48, which is readily available on eBay for $4.25 inc shipping,
// using a ULN2003 interface board to drive the stepper. The 28BYJ-48
// motor is a 4-phase, 8-beat motor, geared down by a factor of 64. One
// bipolar winding is on motor pins 1,3 and the other on motor pins 2,4.
// Refer to the manufacturer's documentation of Changzhou Fulling
// Motor Co., Ltd., among others. The step angle is 5.625/64 and the
// operating Frequency is 100pps. Current draw is 92mA.
// Vin w USB power is 4.5v too slow for testing use 5v pin.
//#include <Narcoleptic.h>
@LyleScott
LyleScott / rotate_2d_point.py
Last active May 1, 2024 21:26
Rotate X,Y (2D) coordinates around a point or origin in Python
"""
Lyle Scott, III // lyle@ls3.io
Multiple ways to rotate a 2D point around the origin / a point.
Timer benchmark results @ https://gist.github.com/LyleScott/d17e9d314fbe6fc29767d8c5c029c362
"""
from __future__ import print_function
import math
@cliffrowley
cliffrowley / STREAMDECK_HID.md
Last active May 16, 2024 20:02
Notes on the Stream Deck HID protocol

Stream Deck Protocol

How to interface with a Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

A complete list of books, articles, blog posts, videos and neat pages that support Data Fundamentals (H), organised by Unit.

Formatting

If the resource is available online (legally) I have included a link to it. Each entry has symbols following it.

  • ⨕⨕⨕ indicates difficulty/depth, from ⨕ (easy to pick up intro, no background required) through ⨕⨕⨕⨕⨕ (graduate level textbook, maths heavy, expect equations)
  • ⭐ indicates a particularly recommended resource; 🌟 is a very strongly recommended resource and you should look at it.
@StephS
StephS / CirclesToPoints.py
Created July 10, 2019 18:12
DXF Circles to Points
import ezdxf
import argparse
class DiameterToRadius(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
print('%r %r %r' % (namespace, values, option_string))
if values > 0:
values = values/2.0
setattr(namespace, self.dest, values)
@Hermann-SW
Hermann-SW / SerialHttpsClient.ino
Created March 22, 2021 21:46
ESP01 sketch taking HTTPS GET URLs from Pico over serial, returning response to Pico
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClientSecureBearSSL.h>
ESP8266WiFiMulti WiFiMulti;
@russhughes
russhughes / customize_vfat.rst
Created April 15, 2021 16:16
Customize MicroPython VFAT Image

Software Installation

Deploying MicroPython

The TurtlePlotBot software was developed and tested using MicroPython version 1.12. The micropython directory contains two firmware .bin files that contain MicroPython as well as the TurtlePlotBot modules and other required modules.

@0187773933
0187773933 / pdfExtractImages.py
Last active October 9, 2023 17:13
Extract Images From PDF
#!/usr/bin/env python3
import sys
import io
from pprint import pprint
from pathlib import Path
from tqdm import tqdm
from binascii import b2a_hex
import shutil
import tempfile
@samneggs
samneggs / fastline.py
Created December 27, 2021 21:20
Line function in MicroPython Viper and Inline Assembly
from LCD_3inch5 import LCD_3inch5
import framebuf
from math import sin,cos,pi, radians
from time import sleep_ms, sleep_us, ticks_diff, ticks_us, sleep
from micropython import const
from uctypes import addressof
import array
from usys import exit
import gc
@samneggs
samneggs / noisematrix.py
Created January 8, 2022 06:11
Pseudo Perlin noise mapped onto 3D matrix in MicroPython
from LCD_3inch5 import LCD_3inch5
from machine import Pin
import framebuf
from time import sleep_ms, sleep_us, ticks_diff, ticks_us, sleep
from micropython import const
import array
from usys import exit
import gc
from random import randint
from math import sin,cos,pi, radians