Software Exploration continues.
I am afraid this week my post is not going to offer to many things, as I do not have to report really much progress myself.
The reason being that I am still trying to make my Nokia 5110 LCD with Graphics capabilities, work under node.js in XDK environment.
I have spent long hours to accomplish that task, but I have not reached my desired goal yet.
In my last post I explained how my LCD works nicely under Arduino IDE, but in order to have the U8g2 graphics library work with node.js under XDK, I need to include the library to UPM.
Although I consider myself more of a Maker than a Programmer, as I am involved with programming, I considered it a necessity to take this task to add U8g2 library to UPM.
I was hoping that I could get some assistance in the form of more detailed documentation that I could study and make things move fast.
As that did not happen, I searched the internet and found the link of Shawn Hymel's Blog with an article entitled “Writing Your Own UPM Module: Getting Started” (http://shawnhymel.com/756/writing-your-own-upm-module-getting-started/).
So I decided to start from there and set up my working space for my task, both locally on my computer and on my Edison.
By now I had both Edison's up and running, so following Shawn's instructions I started my new experience with setting a working and compiling environment with Cmake and SWIG for adding my needed library/driver to UPM.
Shawn has done a very nice job, describing all the steps, but I did not have done such a task before, it took me two days to make the “Test program” work in javascript. Of course that program was a mere “Hello world” and had nothing to do with my specific library. But it was a positive start.
I will not spend time writing about the incompatibilities of the various software that I had to install and the required versions so that Cmake could proceed, or what needed to be removed and replaced by a newer version in order to proceed. SWIG was one of them.
Eventually by setting everything correctly after hours of searching on the internet and fixing all the error messages, I managed to get the command: “node my_mod_test.js” produce the desired result in all 3 systems of mine.
It was Sunday evening, Pacific time and I had to go much further. I had only completed the getting started part!
I then started studying two examples, the one for MAX31855 and another for the Rotary Encoder, as I was going to need that one for my project in order to get some insights.
Nevertheless, perhaps due to my knowledge, I was not confident on how I could make it work for my LCD. So I went back to study the documentation for the U8g2 library and in particular the part under the title: “Porting to new MCU platform”. (https://github.com/olikraus/u8g2/wiki/Porting-to-new-MCU-platform)
I then followed the example of writing the Hardware Extraction Layer (HAL) for another system as it was described in the example for ESP32 by Neil Koblan (https://github.com/nkolban/esp32-snippets/tree/master/hardware/displays/U8G2) and started writing a similar wrapper for Edison's UPM.
Currently I am trying to complete this task, compile everything and see that my LCD works under node.js . Therefore I have no more to say.
Things could have moved faster, but at my age, with my knowledge and programming capabilities that is the fastest I can go. It may take me another week, I hope less.
Otherwise I will start to be behind my schedule for the rest of the things that need to be done in order to accomplish my project. There are of course plan B and plan C options, but very honestly instead of doing this exercise now, I would prefer to use my time for implementing more features and making a richer menu with extra capabilities that I thought of in the meanwhile, including even a graphics S-meter for the SDR, although they were not included in my initial proposal. But I will start to have development limitations as time passes by. I stated from the start that Edison is an entire new ecosystem for me, quite different from what I have been working with over the last 5 years.
U8g2 is an open graphics library that incorporates a number of approx. 72 different types of LCDs under its hood. If I were a manufacturer that I would like to increase the number of “sensors” that could be connected to my system, i.e. Intel Edison, I would take more interest in incorporating such a library into my product's development tools and would not only offer more assistance, but would even offer to undertake such a task on my own. Having said so, I have to admit that this reflects my personal belief.
I can only proceed with my effort and hope that next time I will have something more successful to report.
On top of that, I took some time from my bedtime and I managed to update the drawing of my Edison Arduino board with the correct numbering for the SPI bus as well as IO/GPIOs that I will be using for the Rotary Encoder and the Programming Buttons according to the real conditions of Edison.
Next time if everything goes well, I will also publish the final schematic of my project with the Edison Breadboard and the level translators.
But for the time being I need to deal with my U8g2 library wrapper under UPM. Not in theory but in practice.
Top Comments