I started by commented out the servo related code and when servoMain.attach(10); is commented out the LCD works fine....
Hi I have my arduino uno setup with the following servo and lcdhttp://www.hobbytronics.co.uk/radio-control/servos/hd1800a-micro-servohttp://www.hobbytronics.co.uk/pololu-lcd-16x2Both work fine when controlled separately, but when combined into one project, the LCD is unreadable and the servo is sat idle, so its not a current related issue. See attached code for referenceI started by commented out the servo related code and when servoMain.attach(10); is commented out the LCD works fine, Any help would be appreciated.
thanks for the help, if remove the servo for my circuit and run the code complete (nothing commented out), the LCD is still unreadable, so the issue isn't servo or current relatedany ideas
Hmmm, that reminds me, the Servo library has this warning:The Servo library supports up to 12 motors on most Arduino boards and 48 on the Arduino Mega. On boards other than the Mega, use of the library disables analogWrite() (PWM) functionality on pins 9 and 10, whether or not there is a Servo on those pins. On the Mega, up to 12 servos can be used without interfering with PWM functionality; use of 12 to 23 motors will disable PWM on pins 11 and 12. The tutorial for LiquidCrystal says you should hook up the lcd to pin 9 with PWM. So you might need to rearrange the wiring to move the LiquidCrystal PWM to another PWM pin (3, 5, 6,or 11), but you may then have to move wires on other pins, to get to to one of the PWM pins.
Thanks Michael, thats worked, just had to swap pin 9 to 6, thanks again
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16