Tuesday 23 June 2015

Simple nodemcu module to drive a nokia LCD (PCD8544)

I desperately wanted to hook a Nokia5110 LCD to my ESP8266/nodemcu. I wrote a LUA module but it was slow and it was taking too much memory, mainly because the font data needs to stay in the precious RAM.

It looks like anything I do ends up taking too much memory, so the way to go is to write modules in c and then invoke them from LUA. I am very pleased with the results, so here it is for you to use: Download (just for fun the lua module and the image are also included)

You can use it this way:
  • pcd.init()
  • pcd.locate(0,0)
  • pcd.print("Hello world!")
And if you want to display images you can do it this way:
  • pcd.init() 
  • file.open("image.bin", "r") 
  • pcd.printbin(file.read()) 
  • file.close()
I already sent a pullrequest to the nodemcu guys, it may not get accepted as the pins needed are hardcoded :/ 


  1. Great electronics tips. I had been looking for information on coding. This will greatly help with a project that I am currently working on. I might need to bring a question or two, to find out more. It is great how much education tips and resources can be found over time on the internet. It makes my life much easier.

    Brian Hopkins @ Microtips USA

  2. Way cool! Next time you run into memory problems with the NodeMCU firmware give http://nodemcu-build.com a try. It allows you to easily build a firmware with only those modules enabled that you actually need.

    1. hey, I was building myself nodemcu and compiling it with the minimal requirements. I even coded my own modules that require less memory than the default ones. No luck, i moved to arduino-Esp8266 and all works like a charm :)

  3. This is awesome, I've been wanting to get into this kind of coding for a while now and have found your blog really informative. You provide some really cool tips that will definitely help me on my next project, I have also ran into memory issues in the past so I found this really helpful. Thanks for writing such a great blog!

    Raymond @ CKS Global Solutions LTD

  4. It’s almost less than a decade sine when Gemini has started its trading platform for users. Working on the Gemini platform is easy but as we all know technical devices are prone to threats and the same phrase goes to Gemini also. If you get any issues while working on the Gemini account, you can always talk to the professionals who are available on Gemini support and get fruitful solutions from the professionals in no time.the team is always available to deal with queries and problems in a few seconds.

    For more info visit our website: https://www.cryptowalletsupport.com/gemini-support-number/

  5. Are you unable to verify your Bithumb account? Bithumb verification process involves certain steps along with your personal information. If you are facing error while verifying your account, you can always call on Bithumb support number which is functional. All you have to do is to call to Bithumb customer support and get solutions that are required to deal with the issues. The team is always there to support you and helps you in every possible way to assist you. Connect with the team for better assistance.