I asked Chat GPT to write code for the EYESY to “Draw a perfect circle” and it actually knew what EYESY is, and wrote code for EYESY that in theory should work, but I’m getting errors and I can’t figure out why. Any help is greatly appreciated!
import time
import random
import eyesy
# Initialize EYESY object
e = eyesy.EYESY()
# Set up colors
colors = [(255, 0, 0), (0, 255, 0), (0, 0, 255)]
# Set up parameters
x_pos = 0
y_pos = 0
radius = 0
color_index = 0
# Set up loop
while True:
# Choose random color
color = colors[color_index]
# Update parameters
x_pos = (x_pos + 10) % 640
y_pos = (y_pos + 10) % 480
radius = (radius + 1) % 50
# Draw circle
e.set_param("shape", "circle")
e.set_param("x_pos", x_pos)
e.set_param("y_pos", y_pos)
e.set_param("radius", radius)
e.set_param("color", color)
# Update color index
color_index = (color_index + 1) % 3
# Sleep for a short time to control frame rate
time.sleep(0.1)