Just a thought for discussion on something that Surprised me.
I have an Array of Floats, a Long, and an Int.
The code below was locking up the T3.5. Why?
weight contained a value > 0 and < 1000
Unfortunately, I am also controlling a motor via PWM to a motor Driver. When the T3.5 locks up, PWM keeps on trucking and the motor makes bad stuff happen when the Teensy can't monitor Force and OverTravel switches.. eek..
What's weird is I'm fairly confident that this code was working previously. How?? I am using Visual micro now instead of Arduino IDE is the only difference I can think of.
I fixed it with:
graphData[graphPoint][1] = float(weight);
This has me looking into implementing the Watchdog timer to reset on lockup.. to keep the PWM'd motor from destroying the earth.
hopefully I can use this thread to implement watchdog..
I have an Array of Floats, a Long, and an Int.
Code:
float graphData[80][2];
long weight = 0;
int graphPoint = 0;
The code below was locking up the T3.5. Why?
Code:
graphPoint = 0;
graphData[graphPoint][1] = weight; << Locks up here.
Unfortunately, I am also controlling a motor via PWM to a motor Driver. When the T3.5 locks up, PWM keeps on trucking and the motor makes bad stuff happen when the Teensy can't monitor Force and OverTravel switches.. eek..
What's weird is I'm fairly confident that this code was working previously. How?? I am using Visual micro now instead of Arduino IDE is the only difference I can think of.
I fixed it with:
graphData[graphPoint][1] = float(weight);
This has me looking into implementing the Watchdog timer to reset on lockup.. to keep the PWM'd motor from destroying the earth.
hopefully I can use this thread to implement watchdog..