Skip to content

Instantly share code, notes, and snippets.

@azechi
Last active February 13, 2022 03:34
Show Gist options
  • Select an option

  • Save azechi/6b094b7b1fbf1f1e3f9fd6d3951bf6a1 to your computer and use it in GitHub Desktop.

Select an option

Save azechi/6b094b7b1fbf1f1e3f9fd6d3951bf6a1 to your computer and use it in GitHub Desktop.
Dump Raspberry Pi GPIO edge detection into VCD format file with pigpio notifications and pig2vcd.
#!/usr/bin/env bash
b=0
for i
do
b=$(($b | $((1 << $i))))
done
n=`pigs no`
pig2vcd </dev/pigpio$n >report_pin.vcd &
pigs nb $n $b
read -p "Hit Enter key to stop"
pigs nc $n
$ sudo pigpiod -s 1 -b 1000
$ BCM_Pin_Number=26
$ ./read_pin.sh $BCM_Pin_Number
### Recording Started
Hit Enter key to stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment