Can't get a script to work with a libaray

Hi,
So i've made this library that simplifies the use of using the L293D motor driver chip. My whole library works, so I've decided to make some example sketches (I don't really know about distributing it) and I made this 'GettingStarted' sketch that when you go to the serial monitor and type in 'Forward', 'Backward', or 'Stop', the motor attached to the L293D will move accordingly, and so far the forward and stop commands work, but the backward command doesn't work, instead it moves forward. And I've tested before and I know the function for the motor to go backward works, I've double checked my code, but I can't seem to find the problem. Could someone help me out here?
Thanks!
The library is attached with the getting started sketch in the 'examples' folder.

MotorController.zip (3 KB)

Hi Shak8897

char charOne = 'Forward';
char charTwo = 'Backward';
char charThree = 'Stop';

Character variables (char) can only hold one character. Try changing your values to 'F', 'B' and 'S' and type in just those values as the commands.

Regards

Ray

Thanks Hackscribble! It's working flawlessly now.

One way to distribute your code would be to put it in the exhibition section of this forum. If its too big for a single post, then maybe put it up on github and make an exhibition post using it.

PaulMurrayCbr:
One way to distribute your code would be to put it in the exhibition section of this forum. If its too big for a single post, then maybe put it up on github and make an exhibition post using it.

I didn't know that, thanks!
Though I'm not to sue I want to distribute it yet.