This file contains 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 pygame | |
import sys | |
# Initialize Pygame | |
pygame.init() | |
# Set display resolution | |
screen_width = 1024 # Change this to your screen's width | |
screen_height = 600 # Change this to your screen's height |
This file contains 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
while running: | |
for event in pygame.event.get(): | |
if event.type == pygame.QUIT: | |
running = False | |
elif event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE: | |
running = False |
This file contains 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 datetime | |
import pytz | |
def currentTime(timezone): | |
try: | |
#what goes here? | |
return #what goes here? | |
except: | |
return #what goes here? | |
This file contains 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 json | |
import requests | |
from requests import get | |
app_id = 'your id' | |
app_key = 'your app key' | |
url = 'https://api.edamam.com/api/recipes/v2?type=public&q=chicken&app_id='+app_id+'&app_key='+app_key+'&cuisineType=American' | |
one_food = get(url).json() | |
print (one_food['hits'][0]['recipe']['label']) |
This file contains 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 ssl | |
import socketpool | |
import wifi | |
import microcontroller | |
import adafruit_minimqtt.adafruit_minimqtt as MQTT | |
import adafruit_ahtx0 | |
from adafruit_seesaw.seesaw import Seesaw |
This file contains 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
#hold the escape key to quit | |
import time | |
import pygame | |
from sys import exit | |
# activate the pygame library | |
# initiate pygame and give permission | |
# to use pygame's functionality. | |
pygame.init() | |
# define the RGB value for white, |
This file contains 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
#!/usr/bin/env python3 | |
import requests | |
import RPi.GPIO as GPIO | |
import time | |
import colorsys | |
import sys | |
import ST7735 | |
try: | |
# Transitional fix for breaking change in LTR559 | |
from ltr559 import LTR559 |
This file contains 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 sys | |
from PIL import Image, ImageFont, ImageDraw | |
from inky.auto import auto | |
import time | |
import glob | |
from font_source_serif_pro import SourceSerifProSemibold | |
from font_source_sans_pro import SourceSansProSemibold | |
font_size = 100 |
This file contains 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 | |
from requests import get | |
import json | |
import requests | |
import textwrap | |
from inky import InkyWHAT | |
from PIL import Image, ImageFont, ImageDraw | |
inky_display = InkyWHAT("black") | |
inky_display.set_border(inky_display.BLACK) |
This file contains 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 | |
from requests import get | |
import json | |
import requests | |
import textwrap | |
from inky import InkyWHAT | |
from PIL import Image, ImageFont, ImageDraw | |
inky_display = InkyWHAT("black") | |
inky_display.set_border(inky_display.BLACK) |
NewerOlder