MCS-51

Tutorials

EX-F320

LED Timer
Serial

C8051F340/380

LED Timer
Serial

C8051F V2.1 (F020)

LED Timer
Serial

C8051F300 Dev. B. Mod.

LED Timer
Serial

C8051F V2.1 (F120)

LED Timer
Serial
Benchmarks

51 MCU SCM

Serial

STC89 DEMO BOARD

LED Timer
Serial

EZ-USB FX2LP

LED Timer
Serial
Benchmarks

colecovision.eu

ColecoVision

STM8

MCS-51

LLVM+SDCC

Contact

Fruitydelicious - Animations (11.02.2023)

Fruitydelicious - Animations (11.02.2023)

def animate(i): global vx, vy # Update fruit position x, y = fruit.get_data() x += vx y += vy

# Bounce off edges if x < 0 or x > 10: vx *= -1 if y < 0 or y > 10: vy *= -1 Fruitydelicious animations (11.02.2023)

import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation def animate(i): global vx, vy # Update fruit

fig, ax = plt.subplots()

# Fruits properties fruits = [ {'x': 2, 'y': 2, 'size': 1, 'color': 'r'}, # Apple {'x': 5, 'y': 5, 'size': 2, 'color': 'g'}, # Banana {'x': 8, 'y': 8, 'size': 3, 'color': 'b'}, # Cherry ] def animate(i): global vx