External USB-connected switch?

Hi everyone,

I wanted to find out if there's some way to attach a bigger button to my blinkytape. I found this post which points out you can do it if you're willing to solder something new to the board.

However, is there another way to do it which takes advantage of the USB connection? What I'm wondering is, is there some kind of T-shaped cable that can go between the blinkytape and the power source, which can have a button and whose button state the Blinkytape can access over the USB interface?

Thanks to everyone who made the device possible, it's been a ton of fun so far!

Cheers,

  • Dave

Comments

  • Oh, interesting idea! It's a bit tough to make a switch that uses the USB interface, since it would need to implement a USB host controller in it.

    One way to do this would be to use a regular power switch to do it- you could program the BlinkyTape to switch patterns every time it is turned on, and since it remembers which pattern it used last time, it would cycle to the next pattern every time it is turned back on. A more advanced version would be to add a small resistor and capacitor to the board, to implement a small timer, so that it only switches patterns if the power is turned on and off quickly.

  • Thanks Matt that's an interesting and useful idea. I'm using Arduino Create and having trouble getting a variable that holds it value between boots. I tried this with a global variable, and also a static global variable, but it always resets to 0 upon boot. Is that expected to work? (If it matters, it's an enum)

  • I see that EEPROM can do this. Thank you again!

  • I think you'll find this usb switch cable on Amazon. It switches power from a 5volt power bank on and off: https://www.amazon.com/gp/product/B00JU24Z3W

Sign In or Register to comment.