GithubHelp home page GithubHelp logo

wolframalexa / autonomous-scooter-arduino Goto Github PK

View Code? Open in Web Editor NEW

This project forked from autonomy-lab-cooper-union/autonomous-scooter-arduino

1.0 0.0 0.0 53 KB

C++ 85.49% Processing 14.51%

autonomous-scooter-arduino's Introduction

Arduino

This repository contains the Arduino code for the autonomous scooter. Currently there are two boards on the scooter, one Uno and one Mega. The code for the Uno is in Arduino_Uno and the code for the Mega is in Arduino_Mega. In the near future these two codes will be combined so we can use just the Mega board. IMU_test and Ultrasonic contains test codes for the IMU and the ultrasonic sensors respectively, but at the current stage of the scooter neither of those codes ar being used right now.

Pin Out List for electronic hardware on the scooter

For left incremental encoder next to the left rear wheel:

Green wire (Output A): Pin 2 on the Arduino Mega 2560

Gray wire (Output B): Pin 3 on the Arduino Mega 2560

Yellow wire (Output Z): Pin 18 on the Arduino Mega 2560

Red wire to VCC

Black wire to GND

For right incremental encoder next to the right rear wheel:

Green wire (Output A): Pin 19 on the Arduino Mega 2560

Gray wire (Output B): Pin 20 on the Arduino Mega 2560

Yellow wire (Output Z): Pin 21 on the Arduino Mega 2560

Red wire to VCC

Black wire to GND

All the numbered pins shown above are used for digital interrupts.

For the Absolute Encoder:

Pin 1 (green wire) on EMS22A (Digital Input) connects to GND

Pin 2 (white wire) on EMS22A (Clock) connects to pin 26 on Arduino Mega 2560

Pin 3 (black wire) on EMS22A (GND) connects to GND

Pin 4 (purple wire) on EMS22A (Digital Output) connects to pin 28 on Arduino Mega 2560

Pin 5 (red wire) on EMS22A (VCC) connects to VCC

Pin 6 (yellow wire) on EMS22A (Chip Select) connects to pin 24 on Arduino Mega 2560

Arduino Mega pin 26 outputs the clocking signal that triggers the Digital Output pin on EMS22A to send out bits of data. One reading corresponds to 10 bits of data, plus another 6 bits for checking purposes. Arduino Mega pin 24 outputs a pulse signal to enable the absolute encoder to output a new reading every byte.

For the front Motor Controller:

PWM pin goes to Pin 6 on the Arduino Mega

DIR pin goes the Pin 7 on the Arduino Mega

For the rear Motor Controller:

PWM pin goes to Pin 9 on the Arduino Mega

DIR pin goes the Pin 8 on the Arduino Mega

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.