Keybow as a remote? Is KeybowOS mandatory?


#1

Just seen the new Keybow, and I was wondering if it is mandatory to use of the KeybowOS, or if it can be used with a more general Raspbian (or similar) set-up?

Was just thinking that if it can be read via GPIO into python or such like, it could be a nice little set-up for a remote control style keypad to operate other stuff over wifi via JSON-RPC api’s or suchlike. For example being able to run a remote Volumio or Kodi set-up via their web APIs.

By the way - you’ve got a broken link in the 2nd tutorial (setting up) to the last one (macros & snippets) in the advanced section at the bottom. Looks like you’re missing a close bracket in the link set-up.


#2

That likely depends on whether it uses i2c or an actual GPIO pin per button for button presses etc. You really need the Pinout to see what’s what and thats not up yet. New product so I’d say be patient and see what somebody from Pimoroni has to say. Or wait for somebody else to buy one. Won’t be me, I already spent all my Christmas budget on Arduino stuff. ;) Just posting to see what info comes here as I may eventually buy one.


#3

The tutorials mention each button is linked to a specific individual GPIO pin, which is what got me wondering somewhat.

The question was mainly aimed at @sandyjmacdonald as the author of those tutorials and the knowledgable one about such matters ;)


#4

Ok, sounds doable then. I just took a quick look see.


#5

It’s all one-pin-per-button and a Python library will come eventually.

It’ll also have a dtoverlay, something like:

/dts-v1/;
/plugin/;

/ {
    compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";

    fragment@0 {
        target = <&gpio>;
        __overlay__ {
            keybow_pins: keybow_pins {
                brcm,pins = <5 6 12 13 16 17 20 22 23 24 26 27>;
                brcm,function = <0>;
                brcm,pull = <2>;
            };
        };
    };
    
    fragment@1 {
        target-path = "/";
        __overlay__ {
            gpio_keys: gpio_keys {
                compatible = "gpio-keys";
                pinctrl-names = "default";
                pinctrl-0 = <&keybow_pins>;
                status = "okay";

                key0: key0 {
                    label = "Key 0";
                    linux,code = <11>;
                    gpios = <&gpio 17 1>; 
                };

                dot: dot {
                    label = "Dot";
                    linux,code = <52>;
                    gpios = <&gpio 27 1>;
                };

                enter: enter {
                    label = "Enter";
                    linux,code = <28>;
                    gpios = <&gpio 23 1>;
                };

                key1: key1 {
                    label = "Key 1";
                    linux,code = <2>;
                    gpios = <&gpio 22 1>;
                };

                key2: key2 {
                    label = "Key 2";
                    linux,code = <3>;
                    gpios = <&gpio 24 1>;
                };

                key3: key3 {
                    label = "Key 3";
                    linux,code = <4>;
                    gpios = <&gpio 5 1>;
                };

                key4: key4 {
                    label = "Key 4";
                    linux,code = <5>;
                    gpios = <&gpio 6 1>;
                };

                key5: key5 {
                    label = "Key 5";
                    linux,code = <6>;
                    gpios = <&gpio 12 1>;
                };

                key6: key6 {
                    label = "Key 6";
                    linux,code = <7>;
                    gpios = <&gpio 13 1>;
                };

                key7: key7 {
                    label = "Key 7";
                    linux,code = <8>;
                    gpios = <&gpio 20 1>;
                };

                key8: key8 {
                    label = "Key 8";
                    linux,code = <9>;
                    gpios = <&gpio 16 1>;
                };

                key9: key9 {
                    label = "Key 9";
                    linux,code = <10>;
                    gpios = <&gpio 26 1>;
                };

            };
        };
    };

    fragment@3 {
        target = <&i2s_pins>;
        __overlay__ {
            /*
            We cannot share BCM 20 between gpio keys (Left) and i2s (PCM_DIN)
            Assign PCM_DIN to the HAT EEPROM (ID_SD) pin which should be generally unused.
            */
            brcm,pins = <18 19 0 21>;
            brcm,function = <4 4 0 4>;
        };
    };
};

#6

Thanks Phil.

Will hang on and see what comes out then. Could be a fun little project, although arguably a touch on the expensive side perhaps (to get past she who holds the purse strings anyway).


#7

Eek. Just seen this, Darren. The separate parts will be available to buy in the New Year. It’ll likely be the PCBs, switches, and key caps, and then you can add your own Pi.

I’ve fixed that link too. Thanks for the heads-up!

Just for perspective, here’s a little breakdown of the costs to get the parts separately:

Pi Zero WH: £13.02
Kailh Gold switches: £8.28 for 12 (from Mechbox UK)
Clear DSA key caps: £4.68 (from Mechbox UK)
USB cable: £2.50
Reusable box: £2.50

So (if my maths is correct) you’re getting the rest for £20.98: the two PCBs, mounting plate, and fixings. Decent value!


#8

Thanks Sandy. It wasn’t the price vs cost of materials that was the concern, just the cost overall for a “tinker project”. Especially one that just replaces several existing control options with something all-in-one, but where the existing ones do work. Always a difficult sell to the management… ;-)


#9

You’ll have to think of some indispensable uses for it that “the management” will approve of! :-D