Giter VIP home page Giter VIP logo

metropolia-cannon-game's Introduction

A two-part Java project for remote controlling a Lego Mindstorms EV3 robot with a wireless TCP/IP connection over Bluetooth developed by two 2nd year students (Ilkka Varjokunnas & me) of Metropolia University of Applied Sciences during 2015-10-14โ€”2015-11-12. The robot package contains the code to be uploaded into the EV3 brick, the graphical user interface (built with JavaFX) and game logic are in the game package. A limited debug mode can be activated by editing the Controller.java (it is active by default) which allows using the user interface without access to a Lego Mindstorms robot but it does not simulate the game logic in full.

Required Lego Mindstorms EV3 Robot Parts

See the instructions folder for full building instructions (generated with Lego Digital Designer) for building the robot. If the debug mode is not used, the code requires that at least the following parts are connected to the specified ports on the EV3 Brick. Part number in parentheses.

  • Turning mechanism: [Port C] Ms 2013 engine (6057952)
  • Firing mechanism: [Port D] small motor (6008577)
  • Scoring sensor: [Port #4] Ms, EV3, sensor, colour (6008919)

Wireless Connection using an EV3 Brick

  1. Enable Bluetooth in the EV3 Brick.
  2. Pair the computer with the Brick.
  3. Connect to the Brick using an access point (terminology may vary depending on the operating system) to turn the Brick into a Bluetooth Personal Area Network (PAN) server.
  4. Upload the robot code to the Brick using the EV3 Control Center provided in the leJOS EV3 toolkit.
  5. Start the program in the robot.
  6. Run View.java on the computer.
  7. Connect to the robot using the default settings.

Robot Operation & Game Goal

The robot is controlled using the arrow keys: left and right arrows rotate the cannon, up and down arrow keys fire the cannon with a high or a low arc respectively.

The goal of the game is to fire plastic cannonballs into a suitable playing area (for example built from cardboard) with some sort of a target area. When a cannonball leaves the target area via a channel or a groove, a color sensor embedded in said channel or groove registers the color of the passing ball and scores the player points. The player who gets the highest score (as seen in the highscore list) with six shots, wins.

metropolia-cannon-game's People

Contributors

joseuusitalo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.