Git Product home page Git Product logo

arduino-rc-wired's Introduction

Arduino Wired RC Car

The code in this repository allows you to build a simple remote-control car using an Arduino Mega and a motor driver shield such as the old Adafruit Motor Sheild or the OSEPPP Motor & Servo Shield. It uses the Adafruit Motor Shield Library to drive 4 DC motors based on inputs from a controller that is wired into the Arduino, eleminating the need for complex IR or RF modules and code. This does come with the downside of having a cord connected between the controller and the car, but if the cord is long enough, it shouldn't be too much of a problem. It also controlles 6 LED lights that are used for headlights and for decoration, with the lights reacting to the different directions the car is told to move in.

Hardware

As for the hardware, you will need a V1 Adafruit Motor Sheild, an OSEPPP Motor & Servo Shield or some other motor driver compatible with the Adafruit Motor Shield Library. You'll also need four DC motors and wheels to go on them, an Arduino Mega, and a way to provide 12V to the car. I find that simply connecting lots of AA battery holders together in series works well. If you want to use the LED features, you'll need to have 6 typical LEDs handy. To enclose it all, you can go as fancy or as simple as you want. I used a long rectangular cardboard box, but you can use anything from a metal tin to a 3D-printed housing to a wooden enclosure. Just keep in mind the weight of the car and the power of the motors and the power source. To see photos of how I put my car together, visit the wiki page.

Software

I have written all the code in Arduino C, as is typical with Arduino projects. I used VS Code and PlatformIO to write and debug my code, but I've included Arduiino IDE and raw C++ versions as well. Just use whichever platform you're used to working with - the code is pretty much the same, except for the importing of the Arduino.h library in the PIO version. Speaking of libraries, the only one required to use the motor shield is the Adafruit Motor Shield Library. You can install it by downloading the ZIP file from GitHub and installing it, or by searching for it in the Arduino IDE library manager. If you do this, mare sure you install the one called Adafruit Motor Shield Library, NOT the one for the V2 sheild. NOTE: I wrote the code myself, but used Codeium AI for autocomplete and some code completion.

License

A great thing about this project is that, so long as you have the same inputs and motor driver, you can build pretty much any sort of car you want. The simplicity of this code opens up tons of room for improvement, redesign, customization, and more. Feel free to fork the code and change it as you like. I am placing this code under the GPL v3 license. Be sure to read and follow the license if forking and/or redistributing this code.

arduino-rc-wired's People

Contributors

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