#include <Wire.h>
void setup()
{
Wire.setModule(0);
Wire.begin(); // put your setup code here, to run once:
}
byte val =0;
void loop()
{
Wire.beginTransmission(0x50); //tpl0102 slave address
Wire.write(byte(0x01));
Wire.write(byte(0x00)); //ch1
Wire.write(val);
Wire.endTransmission();
val++;
if(val == 128)
{
val =0;
}
delay(10); // put your main code here, to run repeatedly:
}
The code has been successful is that each channel controls one of the two channels of tpl0102.
What I want is to control the two channels at the same time I do not think you need to change the MAP halgeot how to change.
Let us know if you have the code you should make sure to add or change
did not get the power of Google Translator English.