Close
0%
0%

UniJoystiCle

The Ultimate Unicycle Simulator

Similar projects worth following
Play a Commodore 64 unicycle video game using your real unicycle!

Attach to your smartphone to the unicycle pedal, and start playing! Also compatible with bike video games like Summer Games II.

The UniJoystiCle allows you to use your unicycle to play video games: your unicycle becomes your joystick!

It consists of:

  • The unicycle video game (that runs on a Commodore 64). It has three events:
    • Road Race: Pedal or idle to accelerate
    • Cyclo Cross: hop to jump obstacles
    • Cross Country: Pedal or idle to accelerate and hop to jump obstacles
  • A wifi receiver (esp8266) that connects to the Commodore 64
  • The accelerometer (an smartphone) attached to the unicycle and sends the data to the wifi receiver

Video that explains what the UniJoystiCle is about:


Video that shows how to play video games using the UniJoystiCle:


The UniJoystiCle in all its beauty:

  • The Unicycle with the smartphone attached to its pedal
  • The WiFi device connected to the Commodore 64
  • The Uni Games video game

  • 1 × D1 Mini ESP8266 module Wemos D1 Mini V2 or Wemos D1 Mini Pro
  • 3 × SN74HC4066N Switches and MultiplAnalog Switch ICs Quad Bilateralexers / Analog Switches and Multiplexers
  • 2 × DB9 female 9 Position D-Sub Receptacle, Female Sockets Connector, Through Hole, Right Angle Solder
  • 1 × Barrel jack Power Barrel Connector Jack 2.00mm ID (0.079"), 5.50mm OD (0.217") Through Hole, Right Angle
  • 1 × 1N4001 diode Diode Standard 50V 1A Through Hole DO-41

  • UniJoystiCle v0.4 released!

    Ricardo Quesada11/28/2016 at 20:23 0 comments

    Changes since v0.3:

    • [NEW] Layout: Added new Datassette pass-through connector PCB. Useful to power the UniJoystiCle board from the datasette port
    • [FIX] Client Desktop: Autoresize in Commando and D-Pad mode
    • [FIX] Client Desktop: Win client compiled with Qt5.7 so that it works on Win XP
    • [NEW] Docs: Added documentation. See DOCUMENTATION.md
    • [NEW] ESP8266 Schematic: Reduced real state. Compatible with C128D and SX-64
    • [NEW] ESP8266 Schematic: Using D1 Mini instead of NodeMCU to reduce the real state even more. Making it smaller than 5x5cm. Cheaper to produce
    • [NEW] Firmware: Added support for Station mode with or without WPS.
    • [NEW] Firmware: Added stats: how many joysticks movements are done, and how many seconds are spent in each movement
    • [NEW] Firmware: Added mini webserver (http://unijoysticle.local). Use it to view the stats, to set SSID/passwd, to change to Station mode, to change the MDNS name, to set the interval timeout, and more
    • [NEW] Client: Added Commando Mode: Control both c64 joysticks with one game controller. Ideal for games like Commando or Turrican 2 were the granedes can be thrown with button B. Buttons B, X and Y are mapped to Joy#1 fire (or space), Joy#1 down and Joy#1 right respectively
    • [NEW] Client: Added Commodore Home mode: For home automation. Replaced the old Linear mode
    • [NEW] iOS Client: Added Gyruss mode. Allows you to move the joystick with the gravity. Example: allows you to play games like Gyruss using with this new technique
    • [NEW] Android Client: new client for android. Supports:
      • UniJoystiCle mode
      • Dpad mode + controllers: Generic and OUYA game controllers
      • Commando mode: Generic and OUYA game controllers
      • Commodore Home mode
      • Settings
        • Resolves unijoyticle.local address
        • Can display the server stats from Settings
        • Basically it supports all iOS features except Gyruss mode
    • [NEW] iOS Client: D-Pad works with MFi and iCade game controllers. When in iCade mode, button A and D act as Fire, and buttons B and C and jump
    • [NEW] iOS Client: When using game controllers, optionally jump with button B.
    • [NEW] iOS Client: When using game controllers, buttons A and B can be swapped
    • [NEW] Tests: New Commodore 64 prg to test the UniJoystiCle + instructions
    • [FIX] Android Client / iOS Client: In settings, the default WiFi address is 'unijoysticle.local' (instead of 192.168.4.1). Needed when in Station mode
    • [FIX] Android Client / iOS Client: Instead of sending the state 60 times per seconds, it sends twice per state change. Saves battery life!
    • [FIX] iOS Client: UniJoystiCle Mode: rotation direction fixed.
    • [FIX] iOS Client: Settings: refactored. Looks nicer. Using Navigation Controller + TableView
    • [FIX] iOS Client: Launch screen is the same as the first initial screen. Better UX
    • [FIX] iOS Client: Settings + Launch screen work both in Portrait and Landscape modes
    • [FIX] iOS Client: source code migrated to Swift 3.0 (Xcode 8.1)
    • [FIX] iOS Client: Resets Joy state allowing left/right/up/down to be alone

  • Simplified PCB

    Ricardo Quesada08/15/2016 at 19:08 0 comments

    Trying the Wemos D1 Mini ESP8266 module since it has a smaller real-state than the NodeMCU and enables us to build a PCB smaller than 5cm by 5cm. That's good, because some PCB manufacturers have special prices for PCB smaller than 5cm by 5cm.

    I removed the external power supply. No more barrel jack, no more diode. This is both:

    • to reduce costs
    • to prevent connecting the D1 Mini with +9v since it only supports a max of +5.5v.

    If you want to use an external power supply you can do it with this D1 Mini battery shield:

    Additionally I made the rounded corners. It looks nicer.

  • UniJoystiCle v0.3 released

    Ricardo Quesada07/29/2016 at 22:48 0 comments

    Changes in v0.3:

    • [NEW] iOS Client: uses "angular position" instead of acceleration to simulate the wheel rotation more reliable and enables new features like the handicap (see below)
    • [NEW] iOS Client: new "handicap", "jump threshold" and "movement threshold" properties which simulate a faster wheel rotation, and adds threshold for jump and movement (no need to recompile for different riders/games)
    • [FIX] iOS Client: AppStore compliant
    • [FIX] iOS Client: UniJoystiCle mode calibrated for idling and jumping
    • [FIX] iOS Client: UniJoystiCle mode shows a DPad instead of bits
    • [FIX] ESP8266 Schematic: Uses Copper Pour both in Top and Bottom layers
    • [FIX] ESP8266 Schematic: Uses bitmap in bottom layer
    • [FIX] ESP8266 Schematic: uses DC Jack Barrel with thinner holes
    • [FIX] ESP8266 Schematic: 4066 ICs use VCC and GND from Joystick. C64 works if power external power is off. Otherwise, the unknown state of the ICs was causing strange bugs on the c64. ESP8266 VCC is not used.
    • [FIX] ESP8266 Firmware: prints "UniJoystiCle" + version via Serial (good for debugging)

    Also, "The Uni Games" video game v0.3 was released:

    Get it from here: https://github.com/ricardoquesada/c64-the-uni-games/raw/master/bin/unigames.d64

  • UniJoystiCle v0.2 released

    Ricardo Quesada06/13/2016 at 17:26 0 comments

    I've just released v0.2.

    Changes in v0.2:

    • [NEW] - ESP8266: PCB board version. Breadboard version deprecated
    • [NEW] - ESP8266 Schematic: Added EAGLE board and schematic files. Fritzing diagrams deprecated
    • [NEW] - ESP8266 device: supports 2 joysticks (uses three 4066 ICs instead of two)
    • [NEW] - ESP8266 firmware uses AP mode by default. Uses SSID "unijosyticle" + last 2 bytes of mac address
    • [NEW] - iOS Client: Can be configured to use either joystick port
    • [NEW] - iOS Client: Auto-discover ESP8266 firmware using mDNS
    • [NEW] - iOS Client: UniJoystiCle mode also supports up, down and fire (jump)
    • [FIX] - iOS Client: Uses correct aspect rations in all iPhones: 4, 5, 6 and 6+
    • [FIX] - iOS Client: D-Pad mode uses arrows + circle instead of colored squares
    • [FIX] - iOS Client: D-Pad mode highlights buttons when they are pressed
    • [FIX] - Name: Renamed project from Uni-Joysti-Cle to UniJoystiCle (easier to search, shorter to type)
    • [FIX] - ESP8266 device: replaced NodeMCU LoLin with NodeMCU Amica
    • [FIX] - Sophisticated Glue Material: Uses gaffer tape, instead of duct tape

    Download firmware, PCBs and iOS client from here: https://github.com/ricardoquesada/unijoysticle

  • PCB + updated video game + updated iOS client

    Ricardo Quesada06/08/2016 at 11:28 0 comments

    PCB:

    Finally I decided to use OSH Park for my first batch of PCBs (a batch of 3 boards). Project link: https://oshpark.com/shared_projects/VZojlKkR

    Uni Games video game:


    And I did a major refactor in the Uni Games video games. Basically the idea is to have a "single load" program, so everything in the .prg will be compressed and when an event is triggered (eg: the cross country event), it will be decompressed on the fly.

    Physics god improved a little bit and fixed a few bugs here and there.

    And added a new menu system

    Game can be downloaded from here: https://github.com/ricardoquesada/c64-the-uni-games

    iOS Client:

    The iOS client detects "jump", and also has better interface when using DPad mode.


    v0.2 TODO list:

    • Test PCBs
    • Add auto-fire in DPad mode (like some of the old joysticks)
    • Add a cross-country event in game.

    ETA: Somewhere around July or August.

  • UniJoystiCle board v0.2

    Ricardo Quesada04/30/2016 at 03:24 0 comments

    I'm about to print some PCBs. I had to change the layout a little bit because the USB cable was interfering with the C64 power cable, and also because it is cheaper to batch PCBs that are < 5cm.

    Not sure yet where to print the PCBs though. Any suggestion for a low-volume batch? Seeedstudio Fusion and OSHPark seem to be good candidates.

    The latest Eagle files can be found here: https://github.com/ricardoquesada/unijoysticle/tree/master/schematic

  • Migrating from Fritzing to Eagle

    Ricardo Quesada04/26/2016 at 18:55 0 comments

    Giving Eagle a try... and very happy with the results so far. I like how easy it was to create the board.

  • Schematic + simplified log in

    Ricardo Quesada04/25/2016 at 16:29 0 comments

    • Added support for two joysticks (to compete in a head-to-head unicycle racing)
    • Added support for MulticastDNS: no need to hardcode IP Addresses
    • Added support for Access Point node (new default behavior). ESP8266 will create a "unijoysticle-xxyy" SSID
    • Added schematic
    • iOS client supports Up/Down/Fire commands (and left and right as well). Now it can be used as a complete joystick replacement

View all 8 project logs

  • 1
    Step 1

    Build the WiFi receiver circuit using this schematic:

    And this PCB file:


    What the receiver does, is to open/close the c64 joystick connections with three 4066 switches.

    Since each c64 joystick has 5 inputs (Up, Down, Left, Right and Fire button, not including the potentiometers) we need three 4066, since each one has 4 switches.

    With the ESP8266 it is possible to control two joysticks at the same time, since it has 11 GPIOs. Five GPIOs are needed per joysticks.

    Once the circuit is built, connect it to the Commodore 64 control ports:


    All the EAGLE files (schematic + board) can be download from here:

  • 2
    Step 2

    Clone the esp8266 firmware:

    $ git clone https://github.com/ricardoquesada/unijoysticle.git

    The firmware is located in the "esp8266_firmware/firmware" folder.

    You should compile it using Arduino IDE (or compatible like PlatformIO). Make sure to add the ESP8266 support in the Arduino IDE (instructions here).

    And finally upload the firmware to the ESP8266 module (using Arduino IDE or PlatformIO).

    By default, it will enter into Access Point mode and it will create a SSID named "unijoysticle-XXYY", where XXYY are the last two characters of its mac address.

  • 3
    Step 3

    Download the UniJoystiCle iOS client from the App Store:

    Or download it for Android from Google Play:

    Or download and compile it yourself. It is open source:

View all 6 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

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