Skip to content

WHILL/whill-sdk-arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whill-sdk-arduino

A simple WHILL Model CR Library for Arduino.
We also have a FAQ and developers community website for current and potential Model CR users.
For general questions and requests, please visit https://whill.zendesk.com/hc/ja .

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 [Not Supported]

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

Accelerometer mounted on body. Note: The IMU inside Model CR is not recommended to be used due to its low accuracy. Data is sent but not parsed.

Gyro [Not Supported]

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

Gyro sensor mounted on body. Note: The IMU inside Model CR is not recommended to be used due to its low accuracy. Data is sent but not parsed.

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

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages