Coder Social home page Coder Social logo

microsoft / pxt-automation Goto Github PK

View Code? Open in Web Editor NEW
7.0 8.0 14.0 17 KB

Various algorithm to control things

Home Page: https://maker.makecode.com/pkg/Microsoft/pxt-automation

License: MIT License

Makefile 0.53% TypeScript 99.47%
makecode maker adafruit codal ev3 pxt

pxt-automation's Introduction

Automation Build Status

Various algorithm for Systems & Control operations for Microsoft MakeCode editors.

How to use this library?

In your MakeCode editor, click on the gearwheel menu and click "Extensions", search for "automation" and select this project.

PID controller

A Proportional-Integral-Derivative control is a classic control structure in automation. The user needs to define 3 gains (Kp, Ki, Kd) to tune the controller.

See Reference: Feedback System, Karl Johan Astrom & Rickard M. Murry

let v = 0;
automation.pid1.setGains(1, 0.01, 0.001);
for (let i = 0; i < 10; ++i) {
    v = automation.pid1.compute(0.1, 5);
}

Behaviors

An example of Behavior-based robotics control system.

Moving Average Filter

let r = 0;
for (let i = 0; i < 10; ++i) {
    r = automation.movingAverageFilter1.filter(Math.random());
}

Supported targets

  • for PXT/maker
  • for PXT/adafruit
  • for PXT/codal
  • for PXT/ev3

License

MIT

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

pxt-automation's People

Contributors

damsehgal avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar pelikhan avatar theb0nny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pxt-automation's Issues

What goes in the timestep parameter?

The example in the readme has a constant going in the timestep parameter, but for that matter, it also has a constant going into the y parameter, which is not how this component would actually be used.

A more illustrative example would be helpful.

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.