Built-in button for toggling built-in power

From my practise it often happens that I don’t have my probes hardly attached to circuit before operating with BusPirate. For multiple reasons, one of which could be SOIC SPI flash clip which you need to handle another could be small needle probes on nano scale SMD circuit.
For that reason I would like to toggle power after connecting it physically but with minimum effort which doesn’t require both hands or typing anything on keyboard with one hand. The BusPirate button would be very convinient if I can set e.g set SPI mode, then set the voltage with W to specific value, then toggle between w and W with build-in button without the need to setup curreny any more. It would be also good way to resume built-in power after current limit was triggered.
So I’m looking for opinions and possible ways of integrating such feature, not sure if there is any other feature depending on the button so far

Good suggestion. I have been collecting button ideas and implementing them on a branch for now.

What I have so far is a config menu that sets various things people have requested. I’m not sure this is the way to go. Maybe the button should run a script from flash storage? That way you can automate any number of commands?

1 Like

Scripts with some context related priorities sound good

1 Like

Latest firmware push on main runs button.scr (if present) when the button is pressed. Use the same format as script files: commands are injected in the terminal, lines starting with # are printed as comment.

# Toggle power
w
W 3.3 100

So for your use case this might work. w disables PSU, W 3.3 100 enables PSU with 3.3volts @ 100ma. It would also serve to reset after the fuse blows. Note: the commands need to be two lines, the ; operator doesn’t work in scripts at the moment.

I really like it! I use it to jump to bootloader during development, saves me a key stroke. There were a couple previous attempts that I was really unhappy with, letting it marinate a bit led to a much better solution. Thank you for your input.

1 Like

Hum, so I’d like to make this ‘self documenting’, and you’d like some context awareness. I’m going to add a button command with some simple configuration options, and I’ll include any suggestions there.

2 Likes