Skip to content

Instantly share code, notes, and snippets.

View rlourette's full-sized avatar

Richard Lourette rlourette

View GitHub Profile
"""
Function to calculate peak directivity.
Also includes some examples that are used to check result.
"""
from math import sin, sqrt, pi, log10, radians
import numpy as np
import patch
def SqrtSinPattern(Theta, Phi, *args):
@JamesHagerman
JamesHagerman / my_ys1_notes.md
Last active December 21, 2022 10:43
Some useful YARD Stick One notes

Some useful YARD Stick One notes

This thing is a bit of a beast. People don't give it NEARLY the credit, or the documentation it deserves.

Two ways of using this thing: rfcat directly, or write a python script for it.

Basically, writing a python script is easier. Using rfcat directly is great but often, there are just too many silly settings to configure

@TG9541
TG9541 / ws2812.fs
Last active September 29, 2023 09:57
STM8 eForth WS2812 LED Strip Demo
\ A STM8 eForth WS2812 demo with tested timing
\ for STM8S w/ 16MHz (HSI) clock
\ 3.3V MINDEV: PB4 with 1K pull-up to 5V works well
\res MCU: STM8S103
\res export PB_DDR PB_ODR PB_CR1
#require ]B!
#require ]CB
@TG9541
TG9541 / an_STM8L_low_power_console.md
Last active March 2, 2023 19:00
STM8L051F3: low-power Forth console experiments

STM8L051F3: a low power Forth console

In the stopped state the STM8L needs just a few µA - but in this state the console can't wake up the device: the USART gets no clock. Only GPIO interrupts and peripherals that are clocked from the LSI or the LSE will work! A possible solution is a pin-change interrupt on RxD for waking the core - and the USART - up. In "Active-Halt" mode RTC and WUT peripherals run on 38kHz LSI or 32.768kHz LSE clock (see here). This means that it's possible to have a background task without keeping the core busy.

One of the challenges ist that STM8L docs doesn't describe the USART behavior if the clock is turned on after the start-bit edge, i.e., if the character that wakes the core from "Active-Halt" can still be received.

A pin change interrupt