summaryrefslogtreecommitdiff
path: root/arduino.ino
blob: 54fa2642212bb037536a6500ec44d13cfdac15be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// https://github.com/Seeed-Studio/Grove_I2C_Motor_Driver_v1_3/archive/master.zip


#include <Grove_I2C_Motor_Driver.h>

// default I2C address is 0x0f
#define I2C_ADDRESS 0x0f
 
void setup()
{
    Motor.begin(I2C_ADDRESS);
}

// Set the speed of a motor, speed is equal to duty cycle here
void speed(unsigned char motor_id, int _speed);

delay(1000);

// Stop one motor
void stop(unsigned char motor_id);