I'm looking for a way to connect my Raspberry Pi Model B to my HD44780 LCD, I've tried the Rpi-hw C++ Library but to no avail. You can find the issue about it here. I've been looking ever since for a C++ library, the reason why I want to use a C++ library instead of a C library is because of the ability to use classes in C++. I know that there is a way to get some kind of classes in C but that's a hassle and not very easy to maintain as a project.

If someone knew a good C++ library that supports this LCD without I2C, please tell me. I2C is optional.

  • 2
    If there is a decent working C lib, why don't you just create your own wrappers? – goldilocks Aug 15 '13 at 17:23
  1. you should get ANY library working on your hardware setup to make sure you have wired your thing the right way. usually libraries include sample code, that could be run with minor modifications only, like changing pin numbers.

  2. after you made sure your hardware is setup properly, you may try to convert C code to your C++ project, basically by adding .C files to your makefile and wrapping function declarations in extern "C" { .... }

  • Let's say I add a C library and add it to my project using extern "C" { #include <clibraryhere.h> } Let's say that library has a class named GPIO, do I just declare a variable like normal: "GPIO gpio;" and use its functions like in normal C++? – user9038 Aug 16 '13 at 12:33
  • please, make sure you have your hardware set up right, by successfully running ANY of the numerous samples available on the web. then we can talk further. – lenik Aug 16 '13 at 12:56
  • I have rewired it 3 times and will do it a fourh and last time now. I'm getting frustrated with all of these libraries and wiring them up. WiringPi isn't working either, this is ridiculous. – user9038 Aug 16 '13 at 15:59
  • I have no idea what I did wrong, but it suddenly works. Thanks for helping me out. – user9038 Aug 16 '13 at 16:15
  • glad it worked out =) – lenik Aug 17 '13 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy