I have been using both VirtualWire and LiquidCrystal separately for some time now and today I tried to combine them, connecting a 16x2 LCD and a transmitter to my Leonardo. However I was not able to display any messages on the LCD and after some debuging I found that the vw_setup() function seems to interfere with the lcd.write/print functions. Giving the input value zero, vw_setup(0), would allow me to print but anything above that simply makes the LCD useless! Do you have any ideas on this?
It is wired just as in this picture but with power and ground to connections 15 and 16. And like I said, it works just fine whenever I remove vw_setup(). :.
Thanks a lot HazardsMind, it worked! Any good explanation to why?
I guess this was rather a question about the libraries, but here is however my code (after changing pin 11 to 8 ). The program uses a potentiometer to edit the values of a predefined array, 'disp', and then sends the whole thing with the VirtualWire functions:
You need to put your code in the proper code tags, its the # above the smiley faces.
The reason it works now is because the virtual wire library takes over pins 10 and 11, so if your using the VW library, you wont be able to use those pins.