Thank you, Yes I had already corrected all the errors as per your comment earlier…
The fixed up test.py runs in as much that the lights flash and the shutdown function works
But, here is the very strange output from when I press the capsense button:
/home/pi/optiboot.hex: 1: :107E0000112484B714BE81FFF0D085E080938100F7: not found
/home/pi/optiboot.hex: 2: :107E100082E08093C00088E18093C10086E0809377: not found
/home/pi/optiboot.hex: 3: :107E2000C20080E18093C4008EE0C9D0259A86E02C: not found
/home/pi/optiboot.hex: 4: :107E300020E33CEF91E0309385002093840096BBD3: not found
/home/pi/optiboot.hex: 5: :107E4000B09BFECF1D9AA8958150A9F7CC24DD24C4: not found
/home/pi/optiboot.hex: 6: :107E500088248394B5E0AB2EA1E19A2EF3E0BF2EE7: not found
/home/pi/optiboot.hex: 7: :107E6000A2D0813461F49FD0082FAFD0023811F036: not found
/home/pi/optiboot.hex: 8: :107E7000013811F484E001C083E08DD089C08234E0: not found
/home/pi/optiboot.hex: 9: :107E800011F484E103C0853419F485E0A6D080C0E4: not found
/home/pi/optiboot.hex: 10: :107E9000853579F488D0E82EFF2485D0082F10E0AE: not found
/home/pi/optiboot.hex: 11: :107EA000102F00270E291F29000F111F8ED06801E7: not found
/home/pi/optiboot.hex: 12: :107EB0006FC0863521F484E090D080E0DECF843638: not found
/home/pi/optiboot.hex: 13: :107EC00009F040C070D06FD0082F6DD080E0C81688: not found
/home/pi/optiboot.hex: 14: :107ED00080E7D80618F4F601B7BEE895C0E0D1E017: not found
/home/pi/optiboot.hex: 15: :107EE00062D089930C17E1F7F0E0CF16F0E7DF06D8: not found
/home/pi/optiboot.hex: 16: :107EF00018F0F601B7BEE89568D007B600FCFDCFD4: not found
/home/pi/optiboot.hex: 17: :107F0000A601A0E0B1E02C9130E011968C91119780: not found
/home/pi/optiboot.hex: 18: :107F100090E0982F8827822B932B1296FA010C0160: not found
/home/pi/optiboot.hex: 19: :107F200087BEE89511244E5F5F4FF1E0A038BF0790: not found
/home/pi/optiboot.hex: 20: :107F300051F7F601A7BEE89507B600FCFDCF97BE46: not found
/home/pi/optiboot.hex: 21: :107F4000E89526C08437B1F42ED02DD0F82E2BD052: not found
/home/pi/optiboot.hex: 22: :107F50003CD0F601EF2C8F010F5F1F4F84911BD097: not found
/home/pi/optiboot.hex: 23: :107F6000EA94F801C1F70894C11CD11CFA94CF0C13: not found
/home/pi/optiboot.hex: 24: :107F7000D11C0EC0853739F428D08EE10CD085E9AC: not found
/home/pi/optiboot.hex: 25: :107F80000AD08FE07ACF813511F488E018D01DD067: not found
/home/pi/optiboot.hex: 26: :107F900080E101D065CF982F8091C00085FFFCCF94: not found
/home/pi/optiboot.hex: 27: :107FA0009093C60008958091C00087FFFCCF809118: not found
/home/pi/optiboot.hex: 28: :107FB000C00084FD01C0A8958091C6000895E0E648: not found
/home/pi/optiboot.hex: 29: :107FC000F0E098E1908380830895EDDF803219F02E: not found
/home/pi/optiboot.hex: 30: :107FD00088E0F5DFFFCF84E1DECF1F93182FE3DFCA: not found
/home/pi/optiboot.hex: 31: :107FE0001150E9F7F2DF1F91089580E0E8DFEE27F6: not found
/home/pi/optiboot.hex: 32: :047FF000FF270994CA: not found
/home/pi/optiboot.hex: 33: :027FFE00040479: not found
/home/pi/optiboot.hex: 34: :0400000300007E007B: not found
/home/pi/optiboot.hex: 35: :00000001FF: not found
b’Programming beginning…\n’
…programming done.
Also there seems to be an issue with the “linuxspi” failing on avrdude.
I googled it and found some comments about Debian Bullseye having a issues with linuxspi…
see:
https://forums.raspberrypi.com/viewtopic.php?t=330268
https://github.com/avrdudes/avrdude/issues/1107
So, this Pi AVR Programmer Hat is going to take some effort… I might have to learn something Lol!
Thanks again for your input
Ken