GithubHelp home page GithubHelp logo

satoshirobatofujimoto / whill-sdk-arduino Goto Github PK

View Code? Open in Web Editor NEW

This project forked from whill/whill-sdk-arduino

1.0 2.0 0.0 24 KB

WHILL Model CR SDK for Arduino

Home Page: https://whill.jp/model-cr

License: MIT License

C++ 100.00%

whill-sdk-arduino's Introduction

whill-sdk-arduino

A simple WHILL Model CR Library for Arduino.

Requirements

Getting Started

Download this repository and place on your Arduino library folder.

APIs

Communication

WHILL(SoftwareSerial*)

Initialize WHILL instance with SoftwareSerial.

WHILL::begin(unsigned int interval_ms)

Command WHILL to start reporting WHILL status.

WHILL::refresh()

Fetch serial interface and do internal process. Call this function , WHILL::delay() and/or WHILL::keep_joy_delay() once at least in loop(). Callbacks are fired when these functions are called.

stopSendingData()

Command WHILL to stop report WHILL status.

Manipulation

WHILL::setJoystick(int x,int y)

Manipulate a WHILL via this command.

WHILL::setPower(bool)

Turn on/off a WHILL. True to power WHILL on.

WHILL::setBatteryVoltaegeOut(bool)

Enable/Disable power supply to the interface connector. True to enable power supply.

Sensors and Status

Accelerometer

int WHILL::accelerometer.x
int WHILL::accelerometer.y
int WHILL::accelerometer.z

Accelerometer mounted on body.

Gyro

int WHILL::gyro.x
int WHILL::gyro.y
int WHILL::gyro.z

Gyro sensor mounted on body.

Battery

unsigned char  WHILL::battery.level
signed   long  WHILL::battery.current

Remaining battery level and consumpting current[mA].

Motor State

float   WHILL::left_motor.angle
int     WHILL::left_motor.speed

float   WHILL::right_motor.angle
int     WHILL::right_motor.speed

Motors angle and speed. The angle range is -PI to +PI, Speed unit is km/h.
Note that the speed value is low-pass filterd.

Speed Mode

bool   WHILL::speed_mode_indicator

Current selected speed mode.

Callback

By registering callback functions, You can hook at status is updated.
See Example: callback.ino

License

MIT License

whill-sdk-arduino's People

Contributors

aquahika avatar

Stargazers

 avatar

Watchers

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