Home

codesys.com Ingo
Attachments
Game-Preview.png (6867 bytes)
Pong-Schaltplan.PNG (83789 bytes)
Pong.PNG (89448 bytes)
There is a newer version of this page. You can find it here.

Tutorial for "Retro Games"

In this tutorial you will install a smal game (Pong) on your Raspberry Pi, which can be played with two physical controllers on a web-visualisation.

Things you need:

  • Computer with CODESYS Development System V3 with CODESYS Control for Raspberry Pi SL form the CODESYS-Store
  • every Raspberry Pi (CODESYS V3.5.11.0 or later). For more Information look at the description
    of CODESYS Control for Raspberry Pi SL in the CODESYS-Store.
  • 2x KY040 - Rotary Encoder
  • 10x jumper wire (maybe different colors)
  • LAN-Cable
  • Project files

Hardware:

  • Connect both KY040s to the Raspberry Pi as it is shown in the following images:


  • Insert the LAN-Cable to your Raspberry Pi and make sure that it is connected to
    lokal network. Now boot it by plugging in the powercable.

Software:

After opening CODESYS Development System V3 and adding the CODESYS Control for Raspberry Pi SL,
go to Tools -> Library Repository and Install the library, you have downloaded.

Now conntect to your Raspberry Pi. Therefor double click on "Device" and choose on the new window
at the right your Raspberry Pi as your target device, like in the image below.