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
- 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.
$ git clone https://github.com/mayuk24/espcar.io
Edit the host variable in line 7 for your host.
const
express = require('express'),
app = express(),
server = require('http').createServer(app),
io = require('socket.io')(server),
Move = require('./move');
host = (process.env.HOST || 'YOUR-HOST'),
port = (process.env.PORT || '3000'),
pbl = './public',
msg = () =>
{
console.log(`Server running at http://${host}:${port}/`);
};
Use your code editor to find 'YOUR-HOST' in app.js and change it to your host.
(new E.a({debug:!0,connection:M()("http://YOUR-HOST:3000/")}))
Add your wifi credentials and your server host to the ino file.
const char* ssid = "YOUR-SSID";
const char* pass = "YOUR-PASS";
const char* SERVER = "YOUR-HOST";
int SERVERPORT = 3000;
Now you should be ready to go.
If you want to edit the vue project simply start the project inside the espcar.io-vue-view folder.
cd YOUR-ROOT/espcar.io/espcar.io-vue-view
$ npm install
The same thing edit YOUR-HOST with your host lol.
Vue.use(new VueSocketIO({
debug: true,
connection: io('http://YOUR-HOST:3000/')
}));
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.
copyright © 2020 Marco Concepcion. Licensed under the MIT license.