Skip to content

Instantly share code, notes, and snippets.

@dlech
dlech / multitask.py
Last active March 28, 2023 14:09
Example of LEGO SPIKE Prime scratch program translated to MicroPython using generator functions as coroutines
# spike.control.wait_for_seconds doesn't allow decimal points
# so we replace it with the standard MicroPython sleep function instead
from utime import sleep as wait_for_seconds
from utime import ticks_diff, ticks_ms
# See https://docs.micropython.org/en/latest/library/utime.html for more info on the utime module
from spike import (PrimeHub, LightMatrix, Button, StatusLight, ForceSensor, MotionSensor,
Speaker, ColorSensor, App, DistanceSensor, Motor, MotorPair)
from spike.control import wait_until
@rickbassham
rickbassham / README.md
Last active June 20, 2024 06:42
Step by Step Instructions to create an Open Source Astro-Imaging Computer

Instructions (works on amd64 and arm64)

A copy/paste guide to getting a full working astro-imaging computer running on Ubuntu 20.04 LTS. Installs latest stable versions of gpsd, KStars, INDI, OACapture, SkyChart, ASTAP, and Astrometry.net.

It uses the lightweight XFCE4 desktop, and allows you to VNC in, running everything locally on the astro-imaging pc.

Install Ubuntu Server 20.04.1