PetRockBlock https://blog.petrockblock.com Fun Stuff for Technics Enthusiasts Thu, 17 Aug 2017 10:59:44 +0000 en-US hourly 1 https://wordpress.org/?v=4.8.1 Tutorial: PowerBlock with RetroPie https://blog.petrockblock.com/2017/08/17/tutorial-powerblock-retropie/ https://blog.petrockblock.com/2017/08/17/tutorial-powerblock-retropie/#respond Thu, 17 Aug 2017 10:59:44 +0000 https://blog.petrockblock.com/?p=123299 This is a post as part of a tutorial series about getting to start with the PowerBlock with various images for the Raspberry Pi. In this tutorial we will learn how to use the PowerBlock with RetroPie, a very popular distribution for retro gaming. Preparation If you have not already done it, we need to …

The post Tutorial: PowerBlock with RetroPie appeared first on PetRockBlock.

]]>
This is a post as part of a tutorial series about getting to start with the PowerBlock with various images for the Raspberry Pi. In this tutorial we will learn how to use the PowerBlock with RetroPie, a very popular distribution for retro gaming.

Preparation

If you have not already done it, we need to download the RetroPie image first. You get the image on the official RetroPie downloads site. When you have downloaded the image you need to load it on your SD card. You can follow the Raspberry Pi Software guide for that, if you are unsure how to do that.

Installing the PowerBlock Hardware

Make sure that the Raspberry Pi is switched off before you do any hardware work on it. Attach the PowerBlock with its 2×6 female header to the GPIO pins of the Raspberry Pi as shown on the following image:

PowerBlock with Attached Power Switch
PowerBlock with Attached Power Switch

Attach your power switch to the two pins that are marked with “Switch”. Again, the above image shows that exemplarily.

Attach the micro USB connector of your power supply to the micro USB connector of the PowerBlock:

PowerBlock with attached micro USB cable
PowerBlock with attached micro USB cable
It is important that you connect your switch to the PowerBlock before you connect the micro USB cable of your power supply. Otherwise the Raspberry Pi will start with an endless loop of booting and shutting down.

Installing the PowerBlock Service

We need to go to the console in order to install the PowerBlock driver. If we are in EmulationStation (the graphical front-end of RetroPie) we can exit it by pressing F4.

In order to install the PowerBlock driver and service we can follow the quick installation instructions as given on the driver Github site. To install the driver and the service you just need to call this one command:

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

That command will download the installation script of the PowerBlock service and start the script. It will compile and install the driver as well as install and start the service.

When the script is finished, you get a success or failure message in the console. In case of a success, you can also see that the optional status LED stopped to flash and, instead, is permanently switched on.

Video Demonstration

This video shows how to get started with the PowerBlock and RetroPie.

Conclusion

As you can see, getting started with the PowerBlock involves very few steps. We hope you enjoy your PowerBlock and wish you good luck with your project!

The post Tutorial: PowerBlock with RetroPie appeared first on PetRockBlock.

]]>
https://blog.petrockblock.com/2017/08/17/tutorial-powerblock-retropie/feed/ 0
Our New Website Design and Shop https://blog.petrockblock.com/2017/08/16/website-design-and-shop/ https://blog.petrockblock.com/2017/08/16/website-design-and-shop/#respond Wed, 16 Aug 2017 18:56:13 +0000 https://blog.petrockblock.com/?p=123603 Just a short post here: As some of you might already have seen we have a new website design and shop on our site. Why and What Changes? The previous design existed since 2012 and we felt that it was time to modernise and adapt the site. First of all, we got a new logo, …

The post Our New Website Design and Shop appeared first on PetRockBlock.

]]>
Just a short post here: As some of you might already have seen we have a new website design and shop on our site.

Why and What Changes?

The previous design existed since 2012 and we felt that it was time to modernise and adapt the site.

First of all, we got a new logo, fresh and minimalistic logo.Petrockblock Logo

Regarding the menu, we now have a dedicated blog category that is also shown on the starting page. Besides that our gadgets ControlBlock and PowerBlock got their own top categories on this site: Descriptions, order information, as well as support links are easily accessible now. The RetroPie menu also got finally cleaned up.

And what else?

Another bigger change is the movement of our shop from a third-party service to our site. This has several advantages: On the one hand, the customers do not have to pay any third-party fees and, therefore, can get their gadgets a bit cheaper. On the other hand we had repeatedly the situation were we did not have the features at hand that we wanted to have with the third-party services. With the new shop this is not the case anymore.

We hope you enjoy the new design and shop as we do. If you have any questions or suggestions, feel free to tell us!

The post Our New Website Design and Shop appeared first on PetRockBlock.

]]>
https://blog.petrockblock.com/2017/08/16/website-design-and-shop/feed/ 0
Tutorial: PowerBlock with Raspbian https://blog.petrockblock.com/2017/06/30/tutorial-powerblock-raspbian/ https://blog.petrockblock.com/2017/06/30/tutorial-powerblock-raspbian/#respond Fri, 30 Jun 2017 07:48:40 +0000 https://blog.petrockblock.com/?p=123304 This is a post as part of a tutorial series about getting to start with the PowerBlock with various images for the Raspberry Pi. In this tutorial we will learn how to use the PowerBlock with Raspbian, the most common operating system for the Raspberry. Preparation If you have not already done it, we need …

The post Tutorial: PowerBlock with Raspbian appeared first on PetRockBlock.

]]>
This is a post as part of a tutorial series about getting to start with the PowerBlock with various images for the Raspberry Pi. In this tutorial we will learn how to use the PowerBlock with Raspbian, the most common operating system for the Raspberry.

Preparation

If you have not already done it, we need to download the Raspbian image first. You get the image on the official Raspberry Pi downloads site. When you have downloaded the image you need to load it on your SD card. You can follow the Raspberry Pi Software guide for that, if you are unsure how to do that.

Installing the PowerBlock Hardware

Make sure that the Raspberry Pi is switched off before you do any hardware work on it. Attach the PowerBlock with its 2×6 female header to the GPIO pins of the Raspberry Pi as shown on the following image:

PowerBlock with Attached Power Switch
PowerBlock with Attached Power Switch

Attach your power switch to the two pins that are marked with “Switch”. Again, the above image shows that exemplarily.

Attach the micro USB connector of your power supply to the micro USB connector of the PowerBlock:

PowerBlock with attached micro USB cable
PowerBlock with attached micro USB cable
It is important that you connect your switch to the PowerBlock before you connect the micro USB cable of your power supply. Otherwise the Raspberry Pi will start with an endless loop of booting and shutting down.

Installing the PowerBlock Service

In order to install the PowerBlock driver and service we can follow the quick installation instructions as given on the driver Github site. To install the driver and the service you just need to call this one command:

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

That command will download the installation script of the PowerBlock service and start the script. It will compile and install the driver as well as install and start the service.

When the script is finished, you get a success or failure message in the console. In case of a success, you can also see that the optional status LED stopped to flash and, instead, is permanently switched on.

Conclusion

As you can see, getting started with the PowerBlock involves very few steps. We hope you enjoy your PowerBlock and wish you good luck with your project!

The post Tutorial: PowerBlock with Raspbian appeared first on PetRockBlock.

]]>
https://blog.petrockblock.com/2017/06/30/tutorial-powerblock-raspbian/feed/ 0
Quick Installation Script for the PowerBlock https://blog.petrockblock.com/2017/06/29/quick-install-script-powerblock/ https://blog.petrockblock.com/2017/06/29/quick-install-script-powerblock/#respond Thu, 29 Jun 2017 12:25:58 +0000 https://blog.petrockblock.com/?p=123345 Making the PowerBlock ready to go becomes even easier! The installation of the PowerBlock driver is now a one-liner. We summarised the installation steps that are needed for installing the PowerBlock driver and the service and put all that as an installation script into the driver repository. That means, to install the driver and service …

The post Quick Installation Script for the PowerBlock appeared first on PetRockBlock.

]]>
Making the PowerBlock ready to go becomes even easier!

The installation of the PowerBlock driver is now a one-liner. We summarised the installation steps that are needed for installing the PowerBlock driver and the service and put all that as an installation script into the driver repository.

That means, to install the driver and service for the PowerBlock you need to call this line on the console:

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

And that’s it! To uninstall the PowerBlock service you just need to call

sudo ./uninstall.sh

You can also find all these information in the README within the PowerBlock repository

We hope you find that helpful and wish you good luck with your project!

The post Quick Installation Script for the PowerBlock appeared first on PetRockBlock.

]]>
https://blog.petrockblock.com/2017/06/29/quick-install-script-powerblock/feed/ 0
Quick Installation Script for the ControlBlock https://blog.petrockblock.com/2017/05/21/quick-installation-script-for-the-controlblock/ https://blog.petrockblock.com/2017/05/21/quick-installation-script-for-the-controlblock/#respond Sun, 21 May 2017 20:12:06 +0000 http://blog.petrockblock.com/?p=123041 We realized that the installation of the ControlBlock driver could be simplified. Therefore, we created an installation script that does all the needed steps for compiling, installing the binary, and configuring the ControlBlock service for you! To install the driver and service for the ControlBlock, this is now all that ou have to do: Also, …

The post Quick Installation Script for the ControlBlock appeared first on PetRockBlock.

]]>
We realized that the installation of the ControlBlock driver could be simplified. Therefore, we created an installation script that does all the needed steps for compiling, installing the binary, and configuring the ControlBlock service for you!

To install the driver and service for the ControlBlock, this is now all that ou have to do:

git clone git://github.com/petrockblog/ControlBlockService2
cd ControlBlockService2
sudo ./install.sh

Also, there is a Youtube video that shows you a typical run of that quick installation script:

You can also find all these information in the README within the ControlBlock repository.

We hope you find that helpful and wish you good luck with your project!

The post Quick Installation Script for the ControlBlock appeared first on PetRockBlock.

]]>
https://blog.petrockblock.com/2017/05/21/quick-installation-script-for-the-controlblock/feed/ 0
Update for the ControlBlock Driver with Many New Features https://blog.petrockblock.com/2017/02/19/update-controlblock-driver/ https://blog.petrockblock.com/2017/02/19/update-controlblock-driver/#comments Sun, 19 Feb 2017 15:02:19 +0000 http://blog.petrockblock.com/?p=123028 We just released an update for the driver of the ControlBlock! What does this mean for you? More functionalities! More specifically, the updates contain: 4-player support Multiple ControlBlocks can be stacked on top of each other. With this functionality you can now create your 4-player arcade machine with two ControlBlocks. Each ControlBlock can be configured …

The post Update for the ControlBlock Driver with Many New Features appeared first on PetRockBlock.

]]>
We just released an update for the driver of the ControlBlock! What does this mean for you? More functionalities!

More specifically, the updates contain:

  1. 4-player support
    Multiple ControlBlocks can be stacked on top of each other. With this functionality you can now create your 4-player arcade machine with two ControlBlocks. Each ControlBlock can be configured with its own controller type. That means for example that you could provide two full sets of arcade controllers and two, say, SNES controllers – you can choose!

  2. Genesis/Megadrive, Atari controller support
    The driver now support Genesis / Megadrive and Atari controllers. Both types, the three as well as the six button Genesis controllers, are supported. To use Genesis controllers with the ControlBlock simply set “genesis” as gamepad type in the driver config file.
    Sega Genesis / Megadrive (TM) Controllers are now supported by the ControlBlock

  3. Custom shutdown script
    We got several requests from users who want to execute their own scripts when the power switch is switched to “off”. The whole shutdown actions are now defined in the file /etc/controlblockswitchoff.sh You can add anything you want to be executed on switch off to that script now.

  4. Reset button for SNES gamepad mode
    SNES mode now also provides a reset button functionality. If you want to build your personal retro-gaming machine within a SNES or NES case you can now also connect the reset button to the ControlBlock. The reset button is mapped to the ESC key, which in turn exits for example a running emulator.

ControlBlock with attached SNES Reset Button ControlBlock attached to original SNES Hardware

The reset button must be connected to GND and Player 1, Input B. All configuration settings and detailed information about the other functions are described at the Github site of the driver.

Besides updates of the ControlBlock driver there are now driver modules for the ControlBlock (and the PowerBlock as well) in RetroPie. That makes it even easier for you to install the PowerBlock or ControlBlock driver for your RetroPie project. You find the drivers in the RetroPie-Setup menu at “Manage packages” → “Manage driver packages” → “controlblock”. From there, you can easily install or remove the driver from within the RetroPie Setup.

We hope you enjoy these new features!

If you are missing any functionality or support for different controllers feel free to comment below.

The post Update for the ControlBlock Driver with Many New Features appeared first on PetRockBlock.

]]>
https://blog.petrockblock.com/2017/02/19/update-controlblock-driver/feed/ 12
New Revision of the PowerBlock: Increased Flexibility https://blog.petrockblock.com/2016/05/20/new-revision-of-the-powerblock-increased-flexibility/ https://blog.petrockblock.com/2016/05/20/new-revision-of-the-powerblock-increased-flexibility/#comments Fri, 20 May 2016 20:15:15 +0000 http://blog.petrockblock.com/?p=122629 The PowerBlock is a small support shield for the Raspberry Pi that provides a power switch functionality. Recently, we have updated the design of the PowerBlock such that it now offers an even greater flexibility regarding the connections with the Raspberry Pi. Here is an image of the new PowerBlock Revision 1.1: Besides some fine …

The post New Revision of the PowerBlock: Increased Flexibility appeared first on PetRockBlock.

]]>
The PowerBlock is a small support shield for the Raspberry Pi that provides a power switch functionality. Recently, we have updated the design of the PowerBlock such that it now offers an even greater flexibility regarding the connections with the Raspberry Pi.

Here is an image of the new PowerBlock Revision 1.1:

IMG_2907

Besides some fine tunings in the board layout, these are the major differences to the previous revision of the PowerBlock:

Additional signal breakouts so that input voltage, output voltage, and control signals
All the signal above can now be attached to the Raspberry Pi without using the 2×6 pin connector. As you can see on the image below, there are individual pin outs for the 5V input voltage, the 5V output voltage, as well as for the control signals S1, and S2.

IMG_2907_zoom

The pin out is as following:

5V IN, +,-: supply voltage
S1: pin 12
S2: pin 11
5V OUT +: pin 2 or pin 4
5V OUT -: pin 6 or pin 9

Additional mounting hole for attaching a Raspberry Pi Zero
This addition makes it possible to not only mount the PowerBlock to the Raspberry Pi model A and B, but also to the Raspberry Pi Zero. Here are some exemplary images for the various models:

RPi Model A RPi Model B RPi Zero
IMG_2912  IMG_2911  IMG_2909 

Together with a toggle switch the PowerBlock provides a reliable and safe power switch functionality for the Raspberry Pi. An optional LED can also be attached to the PowerBlock that serves as a power status indicator.

IMG_2913

You can find more details and a comprehensive installation and configuration description on the description site of the PowerBlock.

The post New Revision of the PowerBlock: Increased Flexibility appeared first on PetRockBlock.

]]>
https://blog.petrockblock.com/2016/05/20/new-revision-of-the-powerblock-increased-flexibility/feed/ 47
Python module for MCP23S17 for use with the Raspberry Pi https://blog.petrockblock.com/2016/05/15/python-module-for-mcp23s17-for-use-with-the-raspberry-pi/ https://blog.petrockblock.com/2016/05/15/python-module-for-mcp23s17-for-use-with-the-raspberry-pi/#comments Sun, 15 May 2016 13:50:14 +0000 http://blog.petrockblock.com/?p=112746 Some time ago I revised the hardware design of the ControlBlock and added test points for all major signals. The overall aim was to build a device for doing final system tests that are done before any single ControlBlock leaves for shipping. These system tests are written in Python. This post is about a Python …

The post Python module for MCP23S17 for use with the Raspberry Pi appeared first on PetRockBlock.

]]>
IMG_2906_FotorSome time ago I revised the hardware design of the ControlBlock and added test points for all major signals. The overall aim was to build a device for doing final system tests that are done before any single ControlBlock leaves for shipping. These system tests are written in Python. This post is about a Python module for the MCP23S17 to be used on a Raspbbery Pi.

Basically, the tests set various input signal lines to logical high and low values in a specific order and test if certain output signals have the correct level. To do this, another manually tested ControlBlock is used. Since revision 2.X the ControlBlock uses MCP23S17 GPIO expanders to provide 32 input/output lines for arbitrary usage. I did not find any Python abstraction that would allow me to easily access the MCP23S17 from a Raspberry Pi, so I decided to write a Python module myself.

The result is a publicly available Python module, available via PyPI, that you can install with pip.

Installing the Module

If not already done, you need to install PIP via::

sudo apt-get install python-dev python-pip

Then you can install the module from PyPI via

pip install RPiMCP23S17

That’s it!

Interface of the Module

So, how do you use the module. How does its interface look like? Here is a list of the public methods of the module together with brief descriptions:

  • Constructor – Initializes an instance given the SPI bus number, the chip-enable (CE) number, and the device ID of the MCP23S17 component.
  • open – Opens the configured SPI-bus with hardware-address access and sequential operations mode.
  • close – Closes the SPI connection that the MCP23S17 component is using.
  • setPullupMode – Enables or disables the pull-up mode for a given input pin.
  • setDirection – Sets the direction for a given pin.
  • digitalRead – Reads the level of a given pin.
  • digitalWrite – Sets the level of a given pin.
  • writeGPIO – Sets the 16-bit data port value for all pins.
  • readGPIO – Reads the 16-bit data port value of all pins.

You can find a detailed documentation in the Python docstrings of the module.

Exemplary Usage

Here is some demo code that also comes with the module sources. The demo periodically toggles all pins of two MCP23S17 expanders:

mcp1 = MCP23S17(deviceID=0x00)
mcp2 = MCP23S17(deviceID=0x01)
mcp1.open()
mcp2.open()

for x in range(0, 16):
mcp1.setDirection(x, mcp1.DIR_OUTPUT)
mcp2.setDirection(x, mcp1.DIR_OUTPUT)

while (True):
for x in range(0, 16):
mcp1.digitalWrite(x, MCP23S17.LEVEL_HIGH)
mcp2.digitalWrite(x, MCP23S17.LEVEL_HIGH)
time.sleep(1)

for x in range(0, 16):
mcp1.digitalWrite(x, MCP23S17.LEVEL_LOW)
mcp2.digitalWrite(x, MCP23S17.LEVEL_LOW)
time.sleep(1)

So, if you are tinkering with MCP23S17 components and Python on a Raspberry Pi, you might find this module to be helpful for you.

You can find the module on PyPi here.

By the way, here is an image of the testing station for the ControlBlocks, which we are using to do the final system tests before shipping:

IMG_2905
System Test Station for the ControlBlock using the MCP23S17 and test scripts written in Python

The post Python module for MCP23S17 for use with the Raspberry Pi appeared first on PetRockBlock.

]]>
https://blog.petrockblock.com/2016/05/15/python-module-for-mcp23s17-for-use-with-the-raspberry-pi/feed/ 2
RetroPie 3.6 is Released https://blog.petrockblock.com/2016/03/02/retropie-3-6-is-released/ https://blog.petrockblock.com/2016/03/02/retropie-3-6-is-released/#comments Wed, 02 Mar 2016 06:29:40 +0000 http://blog.petrockblock.com/?p=118794 RetroPie on Raspberry Pi 3? Get RetroPie 3.6! This version is released a little earlier than originally planned, due to the release of the fantastic Raspberry Pi 3 – which our previous 3.5 will not boot on due to having out of date firmware. Along with Raspberry Pi 3 compatibility this release brings a bunch …

The post RetroPie 3.6 is Released appeared first on PetRockBlock.

]]>
Pixel-ArtRetroPie on Raspberry Pi 3? Get RetroPie 3.6!

This version is released a little earlier than originally planned, due to the release of the fantastic Raspberry Pi 3 – which our previous 3.5 will not boot on due to having out of date firmware. Along with Raspberry Pi 3 compatibility this release brings a bunch of interesting experimental emulators such as Daphne for emulation of classic LaserDisc arcade games, a myriad of libretro cores, and a few game engines. We’ve also worked around the pesky insert coin bug that has plagued the arcade emulators.

You can find the links for the SD-card images as usual in the Downloads Sections.
Installation Instructions can be found at Github: https://github.com/RetroPie/RetroPie-Setup/wiki/First-Installation

Changes since 3.5:

Added Support for the Raspberry Pi 3

  • Added new experimental modules:
    • Daphne (Laserdisc Emulator)
    • Libretro-QuickNES
    • Libretro-Beetle PSX (x86 only)
    • Libretro-Beetle Lynx
    • GemRB engine (Baldur’s Gate, Icewind Dale, Planescape)
    • ResidualVM (Engine for Grim Fandango and Escape from Monkey Island)
    • Libretro-MESS (based on the most recent version of MAME)
    • Libretro-MAME (based on the most recent version of MAME)
  • Added EmulationStation theme Simpler Turtle Pi to the theme installer from Omnija.
  • Added version details and uninstall option to the RetroPie Setup Script.
  • Fixed insert coin not working on arcade based emulators.
  • Various other bugfixes and improvements.

The post RetroPie 3.6 is Released appeared first on PetRockBlock.

]]>
https://blog.petrockblock.com/2016/03/02/retropie-3-6-is-released/feed/ 47
RetroPie 3.5 is Released https://blog.petrockblock.com/2016/02/06/retropie-3-5-is-released/ https://blog.petrockblock.com/2016/02/06/retropie-3-5-is-released/#comments Sat, 06 Feb 2016 16:00:30 +0000 http://blog.petrockblock.com/?p=116351 We are pleased to announce the release of RetroPie 3.5. After taking into consideration the feedback from the vibrant RetroPie community, we have provided a few more functions to simplify the user experience such as automatic expansion of the filesystem on boot, less terminal text, and more configuration options for the runcommand launch menu. We …

The post RetroPie 3.5 is Released appeared first on PetRockBlock.

]]>
Pixel-ArtWe are pleased to announce the release of RetroPie 3.5.

After taking into consideration the feedback from the vibrant RetroPie community, we have provided a few more functions to simplify the user experience such as automatic expansion of the filesystem on boot, less terminal text, and more configuration options for the runcommand launch menu. We have also fixed up some bugs with Raspbian Jessie such as the USB ROM service and have added two new experimental modules – the Löve game engine and a ColecoVision emulator (CoolCV).

You can find the links for the SD-card images as usual in the Downloads Sections.
Installation Instructions can be found at Github: https://github.com/RetroPie/RetroPie-Setup/wiki/First-Installation

Changes since 3.4:

  • Added new experimental modules, Lӧve 2D Game Engine, Colecovision (CoolCV).
  • Debian usbmount package fixed up for systemd udev compatibility, making the USB ROM service work properly again without being killed after 30 seconds. Also added ntfs support by default.
  • Added an arcade rom folder option where all arcade games can be placed.
  • Improvements to EmulationStation (Fix crash on rom delete, direct launch, symlink support, and other bug fixes).
  • Improvements to the Runcommand Launch Menu: Cleaner dialog on launch, ability to show game artwork on launch, ability to disable joystick support as well as the ability to disable the entire runcommand launch menu.
  • PS3 Controller improvements – Add multiple gasia and shanwan controller support.
  • Updated lr-mgba emulator binaries (new upstream release of mgba 0.4.0)
  • Improvements on pre-built image – disabled screen blanking, quieter boot, and filesystem automatically expanded on first boot.
  • Various other bug fixes.

The post RetroPie 3.5 is Released appeared first on PetRockBlock.

]]>
https://blog.petrockblock.com/2016/02/06/retropie-3-5-is-released/feed/ 25