Hello, I'm new here at the arduino forum and I came here to ask for a little help from the arduino community.
Hooked up to my Arduino Uno is:
Ardumoto controlling 2 hobby motors
Nokia 5110 LCD Screen
And recently, my code has been malfunctioning to drive the motors, the lcd still works though.
First Error
In order to controll the robot, I use the serial monitor to controll the motors and to put text onto the lcd.
I wrote up some code in processing 1.2 to drive the motors using touchOSC on an iphone.
And Neither of that is working right now. Previously, I've had it run perfectly, with four buttons to controll the directon and a fader to controll pwm, but now its not working.
Well, the command RB and FB, which is for commanding the B Motor to go in Reverse and Forwards, works fine.
Maybe something got unplugged I'm not sure, but I also would some help optimizing the code, (because I know it could be done with a lot less code than I already have), and fixing the error that keeps happening.
The Second Error
When the arduino speaks with the serial monitor, it tells the user how to command the Robot based on the code in my arduino, but after I tell it to go into the Motor program that drives the motor, I have to close it in order to use the processing code. That all works fine and the motor program keeps running untill I run processing, then the arduino reboots and it needs the motor command again. How should I go about doing this. My code will be attached down at the bottom.
RCP.pde (Arduino Code) Short for Robotics Coding Platform
Code.pde (Proccessing Code)
Layout.touchosc(iPhone TouchOSC Layout)
One more thing, I am using Windows 7 to run arduino IDE and Processing, but I could switch over to ubuntu if I needed to, and or to try to fix the problem. I've commented the code a lot, so feel free to comment so I can see what you edited or fixed, that way I can figure out how to improve once the code has been changed.
Thanks,
Shawn
RCP.pde (16.1 KB)
Code.pde (1.73 KB)
Layout.touchosc (673 Bytes)