Make Widora-Neo a Mini Photo Album



  • 0_1476943292522_upload-058dfc5b-5dcf-45f1-a64f-4fe1fbf80252

    I just managed to connect widora with a 3.5inch 480x320 LCD, and make widora a mini photo album. It can show 24bits BMP files from SD or USB card. I wrote a python script, using Image module, to transfer jpg type pictures to BMP format and approriate size for the LCD first, then those BMP pictures are loaded and shown on the LCD for 3 seconds, one by one. You can view the result on YOUKU: http://player.youku.com/player.php/sid/XMTc2NTk0MTIwMA==/v.swf

    The controller (driver) of the LCD is a RM68140 chip, It supports 18/16/9/8-bit data bus and SPI interfaces. I set it as 4-line SPI mode,and one extra GPIO pin of widora must be assigned as data/command select line according to its protocol. 18bit/pixel(262,144 colors) format is selected for the interface, R,G and B each gets 6 bits.
    The interface details are shown as follows:
    0_1477113929414_LCD interfaces.JPG

    In order to make 4-line SPI interface work properly, I copied codes for GPIO and SPI control from https://github.com/ForgotFun/mt76x8 ( Author: ForgotFun), and http://www.cnblogs.com/subo_peng/p/4848260.html (Author: lzy). Luckly, they seemed just tailor-made for widora.

    I compile and build the C program directly in Openwrt using GCC. The main program works in a loop requesting a bmp file and showing it on LCD, in such a way that make it easy for a python script to call and talk with it.

    Finally, you can download the source codes here 0_1477004196509_ShowBMP-10-21.tar . sorry! It seems not so neat. I'm an amature anyway, and make it just for fun.


  • administrators

    Good!!!!