I know the I2C bus supports multiple devices, but for some reason, this combination is not working. The LCD Backpack is at its default address of 0x20 and the PWM Servo board is at it's default address of 0x40.
Each device works on its own, but for some reason, when I connect both, the servo driver stops working. If I disconnect the LCD from the still active circuit, the servos start up right away.
It doesn't seem that the Uno supports 2 I2C busses, so I'm not sure what other alternatives I have. Does anybody have any suggestions?
I know the I2C bus supports multiple devices, but for some reason, this combination is not working. The LCD Backpack is at its default address of 0x20 and the PWM Servo board is at it's default address of 0x40.
Each device works on its own, but for some reason, when I connect both, the servo driver stops working. If I disconnect the LCD from the still active circuit, the servos start up right away.
It doesn't seem that the Uno supports 2 I2C busses, so I'm not sure what other alternatives I have. Does anybody have any suggestions?
The code I am trying to run is just a simple demonstration of the 2 devices working:
When you need to have a post moved to a different forum section, please do that by clicking the "Report of moderator" link at the bottom of the post and asking the moderators to move it.
Cross posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes writing a detailed answer on this thread, without knowing that someone else already did the same in the other thread.
Repeated cross posting will result in a suspension from the forum.
In the future, please take some time to pick the forum section that best suits the topic of your question and then only post once to that forum section. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum section. It contains a lot of other useful information. Please read it.
As far as I can determine the i2c lcd display driver MCP23008 is compatible with the hd44780.
I would recommend you use the hd44780 library. hd44780.h by Bill Perry is the best available for I2C LCDs.
The library is available in the Library Manager. Go to Library Manager (in the IDE, Sketch, Include Libraries, Manage Libraries) and in the Topics dropdown choose Display and in the Filter your search box enter hd44780. Select and install the hd44780 library by Bill Perry.
The class that you want to use is the hd44780_I2Cexp class. There are examples to show how to use the library. The nice thing about the hd44780 library is that it will autodetect the I2C address and the I2C backpack to LCD pin mapping.
In the examples, there is a diagnostic sketch that will help us to help you if you still have trouble with the display. Run the diagnostic sketch and post the results if you have issues with running your display.
If hd44780.h is blocking the output of Adafruit_PWMServoDriver.h we can proceed from there.