Giter VIP home page Giter VIP logo

diego-luna / pinball-moonmakers Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 4.52 MB

MoonMakers-Pinball in a game that works in the browser, where we use our Arduino Nano 33 BLE Sense, as a command to control the imposition of our ball thanks to AI.

Home Page: https://diego-luna.github.io/Pinball-MoonMakers/

License: GNU General Public License v3.0

C++ 0.24% C 14.31% CSS 0.02% HTML 0.02% JavaScript 85.42%
arduino arduino-nano-33-ble-sense css css3 html5 html js javascript tensorflow tensorflow-lite

pinball-moonmakers's Introduction

Pinball-MoonMakers -> Launch experiment

Overview

Pinball-MoonMakers in a game that works in the browser, where we use our Arduino Nano 33 BLE Sense, as a command to control the imposition of our ball thanks to AI.

It is a project developed for the TensorFlow Microcontroller Challenge, to create them we used standard web technologies (HTML, CSS and Javascript), matter.js, p5.js, Arduino Sense 33 BLE, TensorFlow Lite for microcontrollers,

Experiment description and Notes

The project is divided into three stages:

  1. Learning model:
    • Take accelerometer data.
    • Design the learning model.
  2. Arduino:
    • Export the model as a library and add it to the arduino IDE.
    • Enable the BLE connection, to send information from our pairing model to the computer.
  3. Web:
    • Let the browser detect our arduino and establish a connection. note: takes a few seconds to connect
    • We give gravity to our ball, we detect collisions, to give us points and take our lives.

Tools

  • Linux, MacOS or Windows computer with Chrome installed.
  • Arduino Nano BLE Sense 33.
  • Micro USB cable.
  • Joy-con template.
  • [Optional] Battery.

Install and Run

  1. WEB.
  • You can go to the link, and play from your browser.

  • If you want to download the code, you will need to use a local server, you can use:

    • Using the Live Server extension for VS Code we can easily run a development web server for any local folder.
    • Node http-server: In the terminal type:
    npm install -g http-server
    

    From then on just cd to the folder that has the files you want to serve and type.

     browser-sync start --server -f -w
    
    • Node browser-sync:

    In the terminal type:

     npm install -g browser-sync
    

    From then on just cd to the folder that has the files you want to serve and type.

    http-server
    
  1. Arduino
    1. Install the Arduino IDE.

    2. Setup Arduino board:

      • Install the board by navigating to Tools > Board > Boards Manager and search for Arduino Mbed OS Nano Boards.

      • After the board is installed, select it under to Tools > Board > Arduino Mbed OS Nano Boards > Arduino Nano 33 BLE.

      • Select the port by navigating to Tools -> Port -> dev/cu... (Arduino Nano 33 BLE).

    3. Install Arduino libraries.

      • Navigate to Tools > Manage Libraries.
      • Search for and install:
        • Arduino_LSM9DS1.
        • ArduinoBLE.
        • Arduino_TensorFlowLite.
    4. Open the sketch and flash.

      • Download the Pinball-MoonMakers.ino
      • Click the Right arrow in the top left corner to build and upload the sketch.
      • Warning: This process may take a few minutes. Also, warnings may populate but the upload should still succeed in spite of them.

librerias:

  • WEB:

  • Arduino:

    • Arduino_LSM9DS1
    • ArduinoBLE
    • Arduino_TensorFlowLite

More information about Web Bluetooth API:

pinball-moonmakers's People

Contributors

diego-luna avatar

Stargazers

 avatar  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.