mhmd.altnts
New member
Can anyone share with me about using scl2 sda2 using? I cannot use this bus to read data from sensors
#include <Wire.h>
void setup()
{
Wire1.begin();
}
byte val = 0;
void loop()
{
Wire1.beginTransmission(44); // transmit to device #44 (0x2c)
// device address is specified in datasheet
Wire1.write(byte(0x00)); // sends instruction byte
Wire1.write(val); // sends potentiometer value byte
Wire1.endTransmission(); // stop transmitting
val++; // increment value
if(val == 64) // if reached 64th position (max)
{
val = 0; // start over from lowest value
}
delay(500);
}