Giter VIP home page Giter VIP logo

upyarlo's Introduction

uPyArlo

MicroPython library to control DBH-10 for Arlo Parallax platform.

In this repo you will find a script called arlorobot.py, which contains an object ArloRobot() with its corresponding methods in order to controll the driver DBH-10.

Object initialization

The object is defined with the following parameters: def __init__(self,serial_id=2,tx=17,rx=16,baudrate=19200), where serial_id defines the ID of the UART bus that will be used. By default in uPy when serial_id is defined, tx and rx are by default as well, however they can still be changed in case the pins are different in other boards.

Here is an example of how it should be:

from arlorobot import *
robot=ArloRobot()

OR

from arlorobot import *
robot=ArloRobot(serial_id=1, tx=12,rx=13,baudrate=115200)

Note: In the second example, all parameters have been defined by random, it depends on the board, for example the baudrate by default is 19200.

Methods description

Movement Methods

Method What it does
turn(motor_movement, top_speed) Turns the robot in place, but instead of degrees, the motor_movement corresponds to the number of positions to move each wheel, constrained from -32767 to 32767, and top_speed to the speed which is constrained between 1 to 512.
arc
move(left, right, speed) Accelerate, travel, and decelerate across a distance in positions, motors will complete the travel at the same time. left and right are the distance in position, constrained from -32767 to 32767. speed is the positions per second, which goes from 1 to 32767.
go_speed(left, right) Accelerate and sustain a speed, independently for each motor. left/right correspond to the positions per second, which goes from -32767 to 32767.
go(left, right) Set and hold the motor output power, independently for each motor. left/right corresponds to the power of each motor, values go from -127 to 127.

upyarlo's People

Contributors

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