Low-cost oscilloscope powered by the ch32v003
Loading README and project media…

See demo video
Oled should be connected to the only I2C port. The data lines need a 2k pull-up resistor each.
ADC sampling ports are A0-A3.
Buttons go on PD0 (switch) and PD2 (snapshot). They should be floating when open and gnd when closed.
Build the board however you like! It'll work.
Diagram:

See schematic of the circuit in schematic directory.
Go to the src directory, and run make.
Then run minichlink -c 0x1209b803 -w oscilloscope.bin flash -b to flash your ch32.
The firmware has two modes: Capture and real-time.
It boots into real-time. Press switch button to switch between channels and all channel mode.
Press snapshot button to take a snapshot of the signal. On top left there will be n (n ∈ [0;7]) pixels signifying sample length. Less pixels = higher sampling frequency but lower accuracy. More = lower frequency but higher accuracy.
When in snapshot mode, press snapshot button to quit, short press switch to re-capture, long press switch to change sample length.
