File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 2323#define DEFAULT_WIRE Wire
2424#endif
2525
26+ #define DEFAULT_ADDRESS 0x39
27+
2628class ModulinoLEDMatrix
2729#ifdef MATRIX_WITH_ARDUINOGRAPHICS
2830 : public ArduinoGraphics
@@ -42,7 +44,8 @@ class ModulinoLEDMatrix
4244 void autoscroll (uint32_t interval_ms) {
4345 _interval = interval_ms;
4446 }
45- int begin () {
47+ int begin (uint8_t address = DEFAULT_ADDRESS) {
48+ _address = address;
4649 bool rv = true ;
4750 _wire->begin ();
4851 return rv;
@@ -63,7 +66,7 @@ class ModulinoLEDMatrix
6366 }
6467 _sequenceDone = true ;
6568 }
66- _wire->beginTransmission (0x39 );
69+ _wire->beginTransmission (_address );
6770 _wire->write ((uint8_t *)frame, sizeof (frame));
6871 _wire->endTransmission ();
6972 }
@@ -219,4 +222,5 @@ class ModulinoLEDMatrix
219222 bool _sequenceDone = false ;
220223 voidFuncPtr _callBack = nullptr ;
221224 HardwareI2C* _wire;
225+ uint8_t _address = 0 ;
222226};
You can’t perform that action at this time.
0 commit comments