Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
#define Motor_Controller_Module 4#define Set_Motors_Speed 28byte Left_Speed=100;byte Right_Speed=100; Wire.beginTransmission(Motor_Controller_Module); //address Wire.send(Set_Motors_Speed); //command (register) Wire.send(Left_Speed); //value1 Wire.send(Right_Speed); //value2 Wire.endTransmission();
#define Motor_Controller_Module 4#define Set_Motors_Speed 28byte Left_Speed=100;byte Right_Speed=100; Serial.print(Motor_Controller_Module, byte); //address Serial.print(Set_Motors_Speed, byte); //command (register) Serial.print(Left_Speed, byte); //value1 Serial.print(Right_Speed, byte); //value2
We also need a standardized library for communication commands so that every module can use them and each module library doesn't have to handle setting up communications.