Connecting a LCD in Raspberry Pi : the leap less than €10 !
For once, We are not going to do a tutorial on how to install this or that tool but enjoy the Raspberry Pi GPIO interface to connect a LCD. Electronics, a first for me !
Then I have to say that I start a little to regret my lack of attention in the course of physics/electronics of my youth short ! Result ,now, resistance, transistor and other “shift register” look like a mixture of Chinese and Uzbek ! In short I understand nothing. Yet by reading the blog of Idleman, and more particularly this article on an LCD screen, I wanted to like the big ones !
So I spent command on the other side of the globe for a small LCD for the sum of € 4.13 postage included. Over a few female-female cables for € 3.74 always postage included. Once the received packet, It was therefore necessary to move to the weld ! And there was also a first, especially with the soldering iron of my grand father who must have lived well given his head :
The same seen from the front :
I still have progress to make but the welds are in place, remains to connect it to the Raspberry ! For this, the blog of Idleman, always, has a clear and effective ultra schema :
A big thank you because here is the result :
Now remains to test everything :
- Install the C library that will allow easy access to the GPIOapt-get update port && apt-get upgrade
apt-get update && apt - get upgrade apt - get install git-core git clone git://git.drogon.net/wiringPi cd wiringPi git pull origin. / build
- Load the example of Idleman blog
wget http://projet.idleman.fr/domopi/data/piScreen/lcd.zip unzip lcd.zip
You now have a lcd directory that contains the program ‘screen‘ which will allow to send text on the screen.
Problem : the contrast
Big disappointment at the first launch of the command : nothing on the screen. Watching welds, It looked ok … By browsing the comments, It seems that each screen requires a rule.
So I went into the code, in the line that contains :
LcdWrite(LCD_C, 0x 98 ); // Set LCD Vop (Contrast).
And I modified the value of this line, in departing from the value 0x00 and then recompiling the program to repeat a test.
g screen.cpp o screen - lwiringPi ; ./screen p Test
Each time I increase the value of 0x10 (0x 00, 0x 10, 0x 20, etc.), recompile and retested. It allowed me to find the value of my contrast between 0xB0 and 0xC4 (wholesale) :
This is my first electronic experience with Raspberry Pi ! J’avoue maintenant ne pas trop savoir quoi en faire mais j’ai de l’imagination 🙂 Il y a des possibilités avec des librairies et pourquoi pas interagir depuis un site web …
At your soldering irons ! 🙂