Coder Social home page Coder Social logo

2sensorpid's Introduction

Dual-Sensor Proportional-Integral-Derivative Line-Follower Algorithm for Lego Mindstorms EV3

Hello World!

Here's how to use this:

  1. Download and extract the files from this repository, or clone this using $ git clone git://github.com/aryan-02/2sensorpid.git
  2. Before you import the My-Blocks, open the project properties, click "Variables" and create the following variables:

    Variable NameDataType
    ErrorNumeric
    IntegralNumeric
    DerivativeNumeric
    kPNumeric
    kINumeric
    kDNumeric
    l_ErrorNumeric
  3. Import both the My-Blocks (init and PID).
  4. Right after the start block, put the init my-block.
  5. Now, put the PID my-block inside a loop. Add two Color Sensor blocks with mode set to Measure -> Reflected Light Intensity, set the ports for your left and right color sensors respectively. Now, plug in the left and right sensor values into their respective input slots (leftSensorValue and rightSensorValue).
  6. Next, Set your power, kP, kI and kD. Make sure your left motor is connected to port A and the left motor is connected to port B.

And you're done.

Here's how to contribute to this repository:

Fork the repository, make the changes. Make sure you commit your changes and mention what you've improved. Then make a pull request. If the changes are approved, they'll get merged into this repository.

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.