Thanks for your reply!
I do not really get a error message.
I instantiate the class as follows (with 2 channels):
multiStepper myMultiStepper(11, 12, 10, 2);
Inside the header (simplyfied):
multiStepper(int latchPin, int clockPin, int dataPin, int channels);
Inside the constructor (simplyfied):
_channelCount = channels;
_channels[i] = 0;
1. When I Init the array without a size: the MCU crashes -> my test sequence does not
light up (I have LEDs on the shiftregister to see the output)
2. When I init the array with 1 member in the header I get an unexpected number on
position 2 (1) in the _channels array.
I tested the content of the array with this function:
and get this result:
Channel 0: 0
Channel 1: 520
I inti the array with 0 so there must be 0 in both positions in the array... but there
is a 520(??) ... So it seems that the dynamic filling of the array does not work.
If it is not really clear what I mean I will make a simplified example of my problem!