GOPLUS Motor driver Module with MEGA328P
Description
GoPlus is a enhanced M5 module. It features an all-in-one motor driver module, provides a combination of several M5 Modules and Units(SERVO, PbHUB, IR).
comes with 2x DC motor channel, 4x Servo motor channel, IR transmitter, IR receiver, 3x extend PORT B(GPIO Port). This Module can surely help build more complicated and organized motor applications.
Communication Protocol: IIC (0x61).
Product Features
- 2x DC motor channel
- 4x Servo motor channel
- IR transmitter & receiver
- 3x extend PORT B
- MEGA328P
- LV8548MC
Kit includes
- 1x M5Stack GoPlus Module
Documents
- Datasheet - LV8548MC
Learn
Example
Arduino IDE
Code below plus_read_encoder.ino
is incomplete. To get the complete code, please click here.*
/* * Read data from the gear potentiometer * Send infrared light */ #include <Arduino.h> #include <M5Stack.h> #define IrPin 13 #define PLUS_ADDR 0x62 // declaration int32_t number = 0; uint8_t press = 0; // initialization M5.begin(true, false, false); Wire.begin(); ledcSetup(1, 38000, 10); ledcAttachPin(IrPin, 1);// IR Pin setting // read data Wire.requestFrom(PLUS_ADDR, 2); while(Wire.available()) { int8_t encode = Wire.read(); uint8_t press_n = Wire.read(); number += encode; if(press_n == 0xff) { press = 0;//encoder was pressed } else { press = 1;//encoder was releaed } }
More information
Schematic
Driver Protocol
The GOPLUS Motor driver Module with MEGA328P appears in the following collections: