#include <Wire.h>
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
Serial.begin(9600);
}
void loop()
{
for(byte i = 0; i < 10; i++)
{
Wire.beginTransmission(0x10); // transmit to tube address
Wire.write(0x00);
Wire.write(i); //number
Wire.endTransmission(); // stop transmitting
Serial.println(i);
delay(500);
}
}
Thanks for the advice. I definitely had the polarity of the switches wrong in my head. Unfortunately, I am still getting no joy out of the tubes. After a long power off, they will flash briefly when brought up, so I am fairly confident that the micro is alive. Voltages look good, and I am seeing clean pulses on the i2c lines... I tried poking the brightness register as in the datasheet, just in case, as well.
#include <Wire.h>
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
Serial.begin(9600);
for(byte j = 0; j < 6; j++)
{
Wire.beginTransmission(0x08 + j); // transmit to tube address
Wire.write(0x0B);
Wire.write(50);
Wire.endTransmission(); // stop transmitting
}
}
void loop()
{
for(byte i = 0; i < 10; i++)
{
for(byte j = 0; j < 6; j++)
{
Wire.beginTransmission(0x08 + j); // transmit to tube address
Wire.write(0);
Wire.write(i);
Wire.endTransmission(); // stop transmitting
}
Serial.println(i);
delay(50);
}
}