Skip to content

Instantly share code, notes, and snippets.

View russhughes's full-sized avatar

Russ Hughes russhughes

  • One World Telecommunications
View GitHub Profile
#!/usr/bin/env python3
"""
Download the first firmware from the webpage
requirements:
requests
bs4
lxml
Install requirements if not installed:
@russhughes
russhughes / temp.py
Created November 13, 2022 17:12
Micropython temp server for esp8266 yellow board and ds18x20
# Based on web example from https://RandomNerdTutorials.com
try:
import usocket as socket
except:
import socket
from machine import Pin, PWM, ADC, RTC
from time import sleep, time
import onewire, ds18x20
@russhughes
russhughes / capture-output.py
Created November 13, 2022 17:03
Capture python output in a list
import sys
from io import StringIO
def print_function() :
print( "Hello")
print ( "World")
print ( "New\nLine")
class Capturing(list):
def __enter__(self):
@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.

@russhughes
russhughes / main.py
Created April 4, 2021 17:09
Quick and dirty web temp and light sensor
"""
Quick and dirty web based temp and light sensor using ebay 8266 board.
described in this review https://blog.squix.org/2015/01/esp8266-test-board-review.html
Based on project from https://RandomNerdTutorials.com
"""
try:
import usocket as socket
except:
import socket