Assuming "MyValue" stores the value to be written...
if ( MyValue >= 0 )
{
// Make the motor go forward here
analogWrite( pwmPin, MyValue );
}
else
{
// Make the motor go backware here
analogWrite( pwmPin, [glow]-[/glow]MyValue );
}
@AlphaBeta: 15 seconds apart. I'd say that's close enough for ... JINX!