Getting Started with the ControlBlock

ControlBlock with USB, status LED and switch attached

Getting Started with the ControlBlock

The hardware and software setup of the ControlBlock is done in only a few steps. You find all necessary information for making your project run wit the ControlBlock on this page.

Getting Started at a Glance

  1. Attach a toggle or momentary power switch
  2. Optionally, attach a status LED
  3. Mount the ControlBlock on the Raspberry Pi
  4. Attach a power supply
  5. Connect controllers
  6. Install the ControlBlock driver
ControlBlock with USB, status LED and switch attached

1. Attach a toggle or momentary button

To turn the Raspberry Pi on and off with the ControlBlock you need to attach a  button to the two pins labeled with “switch”.

You can use a toggle or a momentary button. The type of button is detected automatically by the ControlBlock.

If you do not want to use the power switch functionality you can disable this in the configuration file /etc/controlblockconfig.cfg by setting “powerswitch”: false.

A good quality power supply and a good quality USB cable are mandatory for a working setup. If unsure, we can recommend the official Raspberry Pi Power Supply.+

2. Optionally, attach a status LED

The ControlBlock has pin outs for an optional status LED that indicates the power state of the Raspberry Pi. You can directly attach an LED to the pins that are marked with “LED”. You need to pay attention to the polarity of the LED: The LED pins are marked with “+” and “-” for that.

The LED will blink in four different patterns that depend on the power state of the Raspberry Pi:

  1. Off: The LED is simply off.
  2. Booting: The LED slowly fades in and out.
  3. On: The LED constantly stays on.
  4. Shutting down: The LED fades in and out twice as fast as during boot up.
ControlBlock with USB, status LED and switch attached
ControlBlock USB-C Connector

3. Mount the ControlBlock

To attach the ControlBlock, mount locking posts first. Then attach the ControlBlock

4. Attach a Power Supply

If you want to use the power switch function of the ControlBlock you need to connect your USB-C cable only to the ControlBlock – and not to the Raspberry Pi directly. Also, you could use the 5V and GND input pins for power supply.

ControlBlock USB-C Connector
ControlBlock attached to original SNES Hardware

5. Connect Controllers

To run the quick installation, you just need to call this one line from the Raspbian console:

wget -O - https://raw.githubusercontent.com/petrockblog/ControlBlockService2/master/install.sh | sudo bash

To uninstall the service you can simply call sudo ./uninstall.sh from within the controlblockservice2 directory.

More information can be found on the driver’s website.

6. Install the ControlBlock driver

If you want to use the power switch function of the ControlBlock you need to connect your USB-C cable only to the ControlBlock – and not to the Raspberry Pi directly. Also, you could use the 5V and GND input pins for power supply.

Top-view of the ControlBlock

 

And that’s it

The ControlBlock should do its job now.

Information about configuration possibilities, logging, and custom shutdown scripts can be found on the driver’s page.

You can also find further information in our forum.