KeiganMotor KM-1 control library using I2C communication
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
LICENSE
README.md
keywords.txt
library.json
library.properties
platformio.ini

README.md

Arduino-I2C-KM1

KeiganMotor KM-1 control library using I2C communication

Documents web site

(https://document.keigan-motor.com)

Description

This library allows an Arduino/Genuino board to control KeiganMotor KM-1 using I2C communication.

Connection

Please refer to the following page.

NOTE You should add pullup resisters as small as possible between SDA and Vdd and between SDL and Vdd.

Basic

Including the library and initialization are required to control KeiganMotor.

Include library

#include "KM1_I2C.h"

Initialize with I2C slave address

The default I2C address of KM-1 is "0xA0"

KeiganMotor motor(0xA0);

Start I2C communication

motor.begin();

Examples

See "examples" folder

Run

motor.enable();
motor.speedRpm(10);
motor.runForward();
motor.wait(5000); // Wait Queue
motor.runReverse();
motor.wait(5000);
motor.stop();

Change I2C Address

motor.i2cSlaveAddress(0xB0);
motor.saveAllRegisters();
delay(2000);
motor.reboot();

Requirement

  • Arduino UNO / Mega / Mega 2560
  • KeiganMotor KM-1 series

Installation

$ git clone https://github.com/keigan-motor/Arduino-I2C-KM1

Zip

https://github.com/keigan-motor/Arduino-I2C-KM1/archive/master.zip

Author

@tkeigan Keigan Inc.

License

MIT