Code Monkey home page Code Monkey logo

espcar.io's Introduction


logo of vue-awesome repository

EspCar.io

EspCar.io is an application that will allow you to control a car made with esp8266 and an H bridge with a virtual joystick through socket.io

Features

  • Supports multiple web clients and esp clients.
  • Distinguish between web clients and esp clients.
  • Each web client can control an esp car.
  • Each web client can see the status of each esp car.

Installation & Usage

$ git clone https://github.com/mayuk24/espcar.io

Edit config.js

Edit the config.js file located in the root directory with your host, port number and the credentials of your wifi network.

const
	host	= (process.env.HOST || 'YOUR-HOST'),
	port	= (process.env.PORT || 'YOUR-PORT'),
	ssid	= (process.env.SSID || 'YOUR-SSID'),
	pass	= (process.env.PASS || 'YOUR-PASS');

Make sure you do not use "localhost", instead use your local ip address otherwise the Esp will not be able to connect to the server websocket.

Npm Install

Go to the directory espcar.io-server and run the command: "npm install" to download the repository's dependencies

$ cd  /espcar.io/espcar.io-server
$ npm install

Update files

Go to the espcar.io-server directory and run the script: "npm run build" to update the client's app.js file and the espcar.ino file with the data you previously added in the config.js file.

$ cd  /espcar.io/espcar.io-server
$ npm run build

You will see the following confirmation message in the terminal

espcar.ino updated
app.js updated

Arduino dependencies

Use the Arduino Library Manager.

  1. Go to Sketch > Include Library > Manage Libraries.
  2. Install WebSockets by Markus Sattler
  3. Install SocketIoClient by Vincent Wyszynski

If you don't have the arduino IDE configured to work with esp8266 boards yet, this link will help you.

After completing the above just upload the Sketch to esp8266.

Run the server

Finally all that remains is to run the script : "npm start" in the espcar.io/espcar.io-server directory.

$ cd  /espcar.io/espcar.io-server
$ npm start

Now you should be ready to go.

Optional

Edit vue project

If you want to edit the Vue project just go to the directory espcar.io/espcar-vue and run the command "npm install"

cd /espcar.io/espcar.io-vue
$ npm install 

Then edit the main.js file inside the src directory with your host and port

Vue.use(new VueSocketIO({
	debug: true,
	connection: io('http://YOUR-HOST:YOUR-PORT/')
}));

Hardware requirements

The main components you need for the esp car are an esp8266 and an h-bridge with 4 inputs and 4 outputs.

In another moment I will add a more detailed guide for the assembly of the esp car and share the stl files.

License

copyright © 2020 Marco Concepcion. Licensed under the MIT license.

espcar.io's People

Contributors

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