2024-02-25 19:55:21 +01:00
2022-06-06 17:47:12 +02:00
2019-09-12 22:48:55 +02:00
2024-02-25 13:23:37 +01:00

FlippR Driver

This is a driver written to control Zaccaria pinball machines from the 2nd Generation. It controls the hardware that can be found in the flippr-circuit repository.

An example game implementation for the Zaccaria Pinball Champ '82 can be found at flippr-game.

Architecture

Build Instructions

By default a static library gets build together with a networking target which enables communication over a UNIX Socket, for possible games.

Dependencies

  • wiringPi 1
  • Boost: program_options thread timer chrono filesystem
  • libthread

Build

To build the flippr-driver library run the following commands:

$ mkdir flippr-code/Flippr-Driver/build
$ cd flippr-code/FlippR-Driver/build
$ cmake ..
$ make

This will create you the static-library file: flippr-code/FlippR-Driver/bin/libFlippR-Driver.a

The library uses wiringPi Pin numbering important for the config files

We added a script /usr/bin/reset_flippr this can be found in the repo and must be chosen in /etc/rc.local. It prevents the solenois from burning!

Build Options

  • -DCROSS_COMPILE Cross compile for raspberry pi. Default: Off
  • -DBUILD_SHARED_LIB Build a shared library. Default: Off
  • -DENABLE_TESTING Enables Tests after build. Default: On
  • -DBUILD_NETWORKING Builds the networking target binary. Default: On
  • -DBUILD_CLI Build a basic TUI to control the flipper by hand. Default: Off

Usage

Configuration

The driver must be configured according to your needs and machine through JSON files.

Exemplary Files that describe this can be found in json_example. The Readme there contains all necessary information about the specific files.

Networking

When built with the networking target (default), the driver is accessible via two UNIX Domain Socket through a simple REST API. The sockets can be found either in the folder specified through the env variable XDG_RUNTIME_DIR or if it is not set in /tmp.

The sockets are: * S.flippR_driver.in: All input events that occure on the pinball machine get pushed there. * S.flippr_driver.out: With this socket the driver can be controlled.

An example connector writtin in Python can be found in the TUI FlippR_Networking.py


  1. Please note that wiringPi is deprecated and might not work on future releases of raspbian and most probably not on a Raspberry Pi5 and future versions. ↩︎

Description
No description provided
Readme 14 MiB
Languages
C++ 96.9%
CMake 2.5%
Python 0.5%