Close
0%
0%

RUNBOX

A GUI for touch screens built on Electron.js - Bootstrap for toggling GPIO enabled USB hubs on a Raspberry Pi.

Public Chat
Similar projects worth following
It's essentially a USB hub controller.

I've been around aircraft for quite some time now and tend to take inspiration from them when thinking up new ideas. Something I thought would be really great is if desktops had a heads down display like aircraft do - though to take care of small tasks rather than display navigation data ;)
One of those small tasks was to handle the switching on and off of USB devices that were not in use. I scoured the internet only to find that the only switchable USB hubs were ones with toggle switches. I mean, it does the job - but not the job I wanted done. After a bit more research I came across the YKUSH Yepkit3 USB hub. This hub is GPIO enabled and was exactly what I was looking for. After that it was just a matter of controlling them. That's where the Raspberry Pi comes in. I was able to get an Electron app running with the help of an existing repo (🙌) that toggles the GPIO of the Pi. I have a laser etcher/cutter so for the housing I just whipped something up real quick to house the boards and before I knew it - RUNBOX was born!

GPIO-Pi4.png

GPIO Reference for connecting GPIO to Ykush3 boards to Raspberry Pi

image/png - 248.69 kB - 11/30/2021 at 13:13

Preview

  • 1 × Raspberry Pi 4 Model B/8GB Its a Pi! - smaller GB models not tested though I'm sure they work
  • 3 × YEPKIT Ykush3 GPIO Enabled USB Hubs
  • 1 × 7Inch Waveshare Touchscreen 1024x600 Touchscreen
  • 9 × Female to Female Breadboard Jumper Wires The colored jumper wires seen in the photos for GPIO connection
  • 9 × 2.54mm Male header pins Ykush3s do not come with GPIO pins - must solder manually - QTY is total pins to solder

View all 8 components

  • ru·di·men·ta·ry

    Matt G12/09/2021 at 20:17 0 comments

    I had to find a way to "easily" add modules with different capabilities. Seeing as how this is built on HTML and JavaScript I had to find a way to do this without losing the USB on/off indications from a page refresh. I decided to utilize the DIVs to make everything south of the header-bar a sliding page. Each section within the DIV would contain a module such as Spotify and/or a hardware monitor. I began the testing with a basic Spotify "Now Listening" visualization made by José Manuel Pérez that I re-styled to try and match the theme.

    Read more »

View project log

  • 1
    Clone and install the RUNBOX repo to your Raspberry Pi

    1. Clone the repo

    git clone git@github.com:Dude-its-Matt-G/RUNBOX.git

    2. Install NPM packages

    npm install

    3. Rebuild modules

    ./node_modules/.bin/electron-rebuild

    4. Run the application

    npm run start
  • 2
    Install YEPKIT's ykushcmd package

    TAKEN FROM YEPKIT GITHUB - https://github.com/Yepkit/ykush

    For Linux libusb-1.0 must be installed. For Debian based systems run the following.

    sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev
    

    With these dependencies installed, build the application the running the following script.

    ./build.sh
    

    After a successful build process you can install the ykush command in the system. To do so, run:

    sudo ./install.sh
    

    After install, the ykushcmd command is ready for use.

    Windows

    To build using MinGW run the following command.

    For 32bit:

    make -f Makefile_win32
    

    For 64bit:

    make -f Makefile_win64
    

    After a successful build process the executable file will be created in the bin\Win32 or bin\Win64 folder depending if it was the 32 or 64 bit build.

  • 3
    Configure Ykush3 for GPIO control

    TAKEN FROM YEPKIT WEBPAGE - https://learn.yepkit.com/tutorial/ykush3-gpio-control-interface

    GPIO control interface is disabled by default on YKUSH3 boards. To enable it do the following.

    # Enable GPIO control interface
    $ sudo ykushcmd ykush3 --gpio enable
    
    # Reset the board
    $ sudo ykushcmd ykush3 --reset
    
    

View all 6 instructions

Enjoy this project?

Share

Discussions

mtg wrote 12/08/2021 at 21:53 point

Very cool and beautiful project! I used YEPKIT Ykush3 when I was working from home and had to remote replug USB devices at work. Super handy. Glad you saw even more potential in it. I don't know much about Electron, but it is very nice looking. I have seen it in action in Synergize ( https://chinenual.github.io/synergize/ ) project. Keep up the good work!

  Are you sure? yes | no

Matt G wrote 12/08/2021 at 23:26 point

Thank you! You’d be surprised to learn of all the applications that use electron. Discord and MS Teams use electron - just to name a few. I appreciate the words of encouragement!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates