This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
TITL: The Great Gatsby | |
AUTH: F. Scott Fitzgerald | |
DESC: The decadent and mysterious Jay Gatsby pursues the American Dream in Jazz Age New York. | |
GNRE: Traffic accidents--Fiction | |
LANG: en | |
--- | |
Dedication | |
Once again | |
to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import sys | |
from epub2txt import epub2txt | |
# Designed for use with Standard Ebooks EPUB files. | |
# May work with others, but their structure is excellent. | |
try: | |
filepath = sys.argv[1] | |
except: | |
print('usage: python3 convert.py book_to_convert.epub') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import board | |
import rtc | |
import time | |
import alarm | |
from adafruit_bme280 import basic as adafruit_bme280 | |
from adafruit_lc709203f import LC709203F, PackSize | |
from oso_lcd.lcdwing_lite import LCDWingLite, Indicator | |
display = LCDWingLite(board.I2C()) | |
display.clear_indicator(Indicator.MOON) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rev_01_map = [[(1, 18), (2, 19), (0, 19), (1, 18), (0, 18), (2, 18), (1, 19), None], | |
[(2, 20), (2, 21), (1, 21), (0, 21), (0, 20), (1, 17), (1, 20), None], | |
[(0, 22), (2, 23), (0, 23), (0, 22), (1, 22), (2, 22), (1, 23), None], | |
[(2, 1), (2, 10), (0, 1), (0, 0), (1, 0), (2, 0), (1, 1), None], | |
[(2, 2), (2, 3), (0, 4), (0, 3), (0, 2), (1, 2), (1, 3), None], | |
[(2, 4), (2, 5), (1, 6), (0, 6), (0, 5), (1, 4), (1, 5), None], | |
[(1, 9), (0, 9), (2, 9), (1, 9), (0, 10), None , (1, 9), None], | |
[(0, 7), (1, 7), (2, 7), (2, 6), (2, 8), (0, 8), (1, 8), None], | |
[(0, 13), (1, 13), (2, 13), (2, 15), (2, 14), (0, 14), (1, 15), (1, 14)], | |
[(0, 11), (1, 11), (1, 11), (2, 11), (1, 12), (1, 12), (2, 12), (0, 12)], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import board | |
import displayio | |
import framebufferio | |
import sharpdisplay | |
from digitalio import DigitalInOut, Direction, Pull | |
from adafruit_debouncer import Debouncer | |
extcomin = DigitalInOut(board.DISPLAY_EXTCOMIN) | |
extcomin.direction = Direction.OUTPUT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adapted from a script by @Oskar_mbr: https://twitter.com/Oskar_mbr/status/1490429921893756928 | |
ring_height = 12; | |
ring_height_taper = 5; | |
ring_inner_diameter = 18; | |
ring_thickness = 1; | |
cavity_diameter = 10; | |
cavity_depth = 6; | |
cavity_width = 1; | |
cavity_extension = 1.5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cb | |
class PrinterManager(object): | |
def __init__(self): | |
self.peripheral = None | |
self.finished = False | |
def did_discover_peripheral(self, p): | |
print(p.name, p.uuid) | |
if p.name and 'BlueTooth Printer' in p.name and not self.peripheral: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import board | |
import busio | |
import displayio | |
import framebufferio | |
import sharpdisplay | |
displayio.release_displays() | |
bus = busio.SPI(board.DISPLAY_CLOCK, MOSI=board.DISPLAY_DATA) | |
framebuffer = sharpdisplay.SharpMemoryFramebuffer(bus, board.DISPLAY_CS, 400, 240) | |
display = framebufferio.FramebufferDisplay(framebuffer, auto_refresh = True, rotation=270) | |
display.show(None) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import board | |
import busio | |
import displayio | |
import framebufferio | |
import sharpdisplay | |
displayio.release_displays() | |
bus = busio.SPI(board.DISPLAY_CLOCK, MOSI=board.DISPLAY_DATA) | |
framebuffer = sharpdisplay.SharpMemoryFramebuffer(bus, board.DISPLAY_CS, 400, 240) | |
display = framebufferio.FramebufferDisplay(framebuffer, auto_refresh = True, rotation=270) | |
display.show(None) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import board | |
import busio | |
import displayio | |
import framebufferio | |
import sharpdisplay | |
displayio.release_displays() | |
bus = busio.SPI(board.DISPLAY_CLOCK, MOSI=board.DISPLAY_DATA) | |
framebuffer = sharpdisplay.SharpMemoryFramebuffer(bus, board.DISPLAY_CS, 400, 240) | |
display = framebufferio.FramebufferDisplay(framebuffer, auto_refresh = True, rotation=270) | |
display.show(None) |