Python library for a LCD on Arduino Yun

I believe that one of the main advantages of having an arduino yun is to be able to program using other languages other than C available on the arduino IDE.

I want to write a python program that interfaces with a 16x2 character LCD display using arduino Yun. I see I can access the I/O pins with files on the /dev file system, but is there a python library I can use to write stuff I want on the LCD display. Everything I see is for the Arduino IDE.


No, you still will need to write a sketch for the arduino to control the LCD (and where you will find libs to do so) and communicate with your Python script using Bridge (which is the communication lib for Yun).

I see I can access the I/O pins with files on the /dev file system

Those aren't the same pins. There are two processors on the Yun: one is the same as an Arduino Leonardo, one is running the OpenWRT variant of Linux. All of the shield connector pins come from the Leonardo side, while Python runs on the OpenWRT side. While the OpenWRT side does have its own I/O pins, and they are accessible to Python, they are internal to the board and not externally accessible.

If you want to access the pins on the shield connector, you're going to have to do it with Arduino code. You can do most of the processing in Python and then send the results to the Arduino side for output (to put on an LCD for example) but you can't directly control the outputs from Python. (The closest would be to run something like Firmata on the Arduino side, which would give you individual pin control from Python, but this would be a very inefficient way to drive an LCD.)