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
# Centipede | |
import centi_splash | |
from lcd_1_8 import LCD_1inch8 | |
import machine | |
from machine import Pin, PWM | |
from uctypes import addressof | |
from time import sleep, ticks_us, ticks_diff, ticks_ms | |
import gc, _thread, array |
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
from machine import Pin,SPI,PWM,mem32,freq | |
import framebuf | |
from time import sleep_ms, sleep_us, ticks_diff, ticks_us | |
from micropython import const,heap_lock | |
import ustruct,gc | |
from random import randint | |
from usys import exit | |
LCD_DC = const(8) | |
LCD_CS = const(9) |
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
from LCD_3inch5 import LCD_3inch5 | |
import framebuf, gc, _thread | |
from micropython import const | |
from machine import Timer, UART, Pin | |
#constants | |
BRICK_WIDTH = const(20) | |
BRICK_HEIGHT = const(10) | |
BALL_SIZE = const(5) | |
BALL_X_START = const(390) |
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
# Star Castle | |
from lcd_1_8 import LCD_1inch8 | |
import machine | |
from machine import Pin, PWM | |
from uctypes import addressof | |
from time import sleep, ticks_us, ticks_diff, ticks_ms | |
import gc, _thread, array | |
from sys import exit | |
from micropython import const | |
from random import randint |
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
#Artillery | |
from lcd_1_8 import LCD_1inch8 | |
import machine | |
from machine import Pin, PWM | |
from uctypes import addressof | |
from time import sleep, ticks_us, ticks_diff, ticks_ms | |
import gc, _thread, array | |
from sys import exit | |
from micropython import const | |
from random import randint |
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
# Hill Climb | |
from lcd_1_8 import LCD_1inch8 | |
import machine | |
from machine import Pin, PWM | |
from uctypes import addressof | |
from time import sleep, ticks_us, ticks_diff, ticks_ms | |
import gc, _thread, array, framebuf | |
from sys import exit | |
from micropython import const | |
from random import randint |
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
# Race car bots | |
from machine import Pin,SPI,PWM,ADC, Timer, reset, soft_reset | |
import framebuf, gc | |
import time, array, _thread | |
from time import sleep, ticks_us, ticks_diff, ticks_ms | |
from lcd_1_8 import LCD_1inch8 | |
from random import randint | |
from sys import exit | |
from math import sin,cos,pi, radians |
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
# Missile Command game | |
from machine import Pin,SPI,PWM,ADC, Timer, reset, soft_reset | |
import framebuf, gc | |
import time, array, _thread | |
from time import sleep, ticks_us, ticks_diff, ticks_ms | |
from lcd_1_8 import LCD_1inch8 | |
from random import randint | |
from sys import exit |
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
# pico_sieve.py | |
# Raspberry Pi Pico - Sieve of Eratosthenes demo | |
# Calculate all the prime numbers within a range of low integers. | |
# Based on: | |
#https://courses.ideate.cmu.edu/16-223/f2022/text/code/pico-numerical.html | |
import time,array | |
import math,gc | |
from usys import exit |
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
from LCD_1inch14 import LCD_1inch14 | |
from machine import Pin,SPI,PWM, Timer | |
import framebuf, math | |
import utime, gc | |
from random import randint | |
from usys import exit | |
from micropython import const | |
class Obj(): | |
def __init__(self,x,y,ax,ay,w,h): |