Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Adafruit Feather M0 Bluefruit - how many buttons?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Feather M0 Bluefruit - how many buttons?

by ubermick on Wed Aug 05, 2020 8:18 pm

Heya folks,

So apologies for horribly ignorant questions, but... I'm the idiot that comes up with ideas without the knowledge to actually implement them.

Am looking to build a button box for use with PC gaming (think space sim/flight sim, etc.) and am also looking to backlight it with quite a few LEDs. At the moment, the notion is to have about 25 or so buttons/toggles, each one with a corresponding LED.

Obviously, a normal Arduino can handle the buttons, but not the LEDs - I'd need an external power source in addition to the USB cable, which adds clutter, so am trying to avoid that. The next idea was using just power from a 5v wall wart to provide power (to Arduino and LEDs) and then simply use Bluetooth as the communication device in lieu of the USB cable. (5V 2A wall wart comes in, and just splice a USB cable to power the Arduino). I was initially just thinking of whacking a BT module onto one of the Arduino Unos I have lying around, but then I started reading about the Feather Bluefruit, and was wondering if it was a better all-in-one solution.

Buuuuut, if I'm reading correctly, it just has 8 digital pins, which means I can only (at best) use 16 buttons in a 4x4 matrix? Or is there a way that I'm blanking on to use some of the analog pins as well?

ubermick
 
Posts: 8
Joined: Fri May 17, 2013 1:50 pm

Re: Adafruit Feather M0 Bluefruit - how many buttons?

by dastels on Wed Aug 05, 2020 11:11 pm

Most of the analog pins can be used as digital I/O as well, but you're still limited. The M0 BLE feather uses the SPI pins for the BLE coprocessor, so the nRF52840 might give you a few more pins.

Another idea would be to use a neotrellis https://learn.adafruit.com/adafruit-neotrellis/for your buttons and RGB leds. Each gives you 16 buttons/leds and 32 can be tiled to give up to 512. It uses I2C so should work with any processor board.

If 32 buttons is adequaete, the NeoTrellis M4 Express https://learn.adafruit.com/adafruit-neotrellis-m4 would be another option. It has a ATSAMD51 (aka "M4") onboard. It was in an AdaBox a while ago so there are plenty of projects and information.

Dave

dastels
 
Posts: 3536
Joined: Tue Oct 20, 2015 3:22 pm

Re: Adafruit Feather M0 Bluefruit - how many buttons?

by ubermick on Wed Aug 05, 2020 11:20 pm

Thanks for that dastels, really appreciate it.

I'm going with a more custom solution for the box. 3D printing the enclosure, and lasering the front panel, so it'll look something akin to this:

Image

So logisitcally those Neotrellis boards do the job, but don't fit the aesthetic. (Here's where I point out I'm a graphic designer, so FORM OVER FUNCTION, damnit!!! ;) )

I know exactly how the ones in that image are made (they're using a Leonardo for controls, and just LED strips for uniform backlighting, but again they require a 12v power supply to power the LEDs, a USB cable for the Arduino, and what I'm planning will be attached to a HOTAS which will have its OWN USB cable into the mix too, which is why I'm trying to cut down on cabling to keep things neat) And am hoping to use individual LEDs (different colours) to highlight functions, instead of a uniform colour.

ubermick
 
Posts: 8
Joined: Fri May 17, 2013 1:50 pm

Re: Adafruit Feather M0 Bluefruit - how many buttons?

by dastels on Wed Aug 05, 2020 11:39 pm

That makes sense.

NeoPixels might be a good lighting solution if they will work physically for what you want. Single wire control for 100s if required, 24-bit RGB, and very bright.

Dave

dastels
 
Posts: 3536
Joined: Tue Oct 20, 2015 3:22 pm

Re: Adafruit Feather M0 Bluefruit - how many buttons?

by ubermick on Wed Aug 05, 2020 11:49 pm

Neopixels were one of the first things that popped into my head, I use them to build lightsabers and they look fantastic - but still leaves me the issue of what to use as a bluetooth interface (suppose I could use an Arduino Nano, I have a few lying around, and something like an RN-42, but trying to keep it as compact as possible)

ubermick
 
Posts: 8
Joined: Fri May 17, 2013 1:50 pm

Re: Adafruit Feather M0 Bluefruit - how many buttons?

by dastels on Thu Aug 06, 2020 8:55 am

What about a Feather or ItsyBitsy nRF52840? Small board, onboard BLE. You could use a MCP23017 (I2C based, dual 8-bit port) to drive an 8x8 switch matrix. Googling for "mcp23017 switch matrix" will get you plenty of information.

Dave

dastels
 
Posts: 3536
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.