Git Product home page Git Product logo

coyotebot's Introduction

CoyoteBot

Control an esp8266 tank with an android phone (processing + arduino + esp8266)

Description

This is a simple arduino + processing (android) project to show how to control electronic devices using an esp8266 based board and an android phone running a processing sketch.

There are plenty of examples and tutorials around but I could not find a minimally functional straightforward project to start from there. Taking a basic project and improving it is one of the best ways I have found for learning new stuff. Anyway, since there was nothing like what I was looking for, I wrote this little project.

Usage

The code is as simple as it gets. It sets up the esp8266 as an access point and the android phone connects to it.

The communication protocol is based on UDP to make it fast and simple. However, this can be a problem for large separations where there will be missed packets but for my applications (simple learning robot for my kids) this is perfect. I have almost no missed packets. This is easy to see as the robot simply ignores you.

The commands are continuously sent regardless if there is a change in the state or not. A better implementation would be a state machine with something like a "heartbit" updating and cheling status from time to time as done by Hadoop (to check the status of a datacenter).

The "controller" app has two vertical control bars like those in remote controlled tank toys. It can control the speed using pulse width modulation (PWM) and has forward and reverse. The controls can be adjusted at the same time (i.e. multitouch).

If you modify the code keep in mind that it is a bad idea to pass high values to both inputs of the H-bridge at the same time.

Notes

In order to let the android app communicate to other device we must tell it explicity in the AndroidManifest file:

<uses-permission android:name="android.permission.INTERNET"/>

CoyoteBot

You can find plenty of robots at trift stores. We found a R.A.D 2.0 toy robot, cut the upper torso and removed the electronics. The result is CoyoteBot, a very nice tank with plenty of space for whatever project we think next.

The esp8266 board we used is the esp8266 ESP12E

picture

driving the motors with an L298N Dual H Bridge Stepper Motor Drive

picture

And finally this is CoyoteBot. It still needs a top cover, I will probably 3D print something to mount a Lego baseplate.

picture

picture

coyotebot's People

Contributors

miguel-aragon 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.