Skip to content

Instantly share code, notes, and snippets.

View techieji's full-sized avatar

Pradhyum R techieji

View GitHub Profile
@techieji
techieji / stw.py
Created June 3, 2023 18:41
Robot code
# General reference: https://docs.micropython.org/en/latest/rp2/quickref.html
# Accelerometer library: https://github.com/adafruit/Adafruit_CircuitPython_LIS331
# Units (unless otherwise noted):
# Length: inches
# Time: minute
# Speed: inches per minute
from math import pi, sin, sqrt
from collections import namedtuple
import pygame
import math
import itertools as it
pygame.init()
screen = pygame.display.set_mode((500, 500))
clock = pygame.time.Clock()
running = True
pos = (0, 0)