Coder Social home page Coder Social logo

oledterm's Introduction

oledterm

Mirror your Linux console terminal output to an OLED display module

Uses luma.oled to drive the OLED. Tested with an SSD1325-based module, 2.7" 128x64, which allows for 9x25 text.

To run on boot, add to /etc/rc.local:

python /home/pi/oledterm/oledterm.py --display ssd1325 --interface spi --rotate 2 &

then attach a keyboard, and you can interact with the terminal as normal. Example running uname:

uname

and since it uses your terminal, even full-screen programs like vim work as expected:

vim

As seen in Building a small custom Raspberry Pi Zero laptop in a cardboard box.

oledterm's People

Contributors

satoshinm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

oledterm's Issues

Newly added ILI9341 display does not work

root@raspberrypi:/home/pi/oledterm# python oledterm.py --display ili9341 --interface spi --rotate 2 --width 320 --height 240
Traceback (most recent call last):
File "oledterm.py", line 112, in
device = get_device()
File "oledterm.py", line 38, in get_device
device = cmdline.create_device(args)
File "/usr/local/lib/python2.7/dist-packages/luma/core/cmdline.py", line 197, in create_device
device = Device(serial_interface=serial, **params)
File "/usr/local/lib/python2.7/dist-packages/luma/lcd/device.py", line 465, in init
self.clear()
File "/usr/local/lib/python2.7/dist-packages/luma/core/mixin.py", line 46, in clear
self.display(Image.new(self.mode, self.size))
File "/usr/local/lib/python2.7/dist-packages/luma/lcd/device.py", line 489, in display
self.data(self.framebuffer.image.crop(self.framebuffer.bounding_box).tobytes())
File "/usr/local/lib/python2.7/dist-packages/luma/core/device.py", line 46, in data
self._serial_interface.data(data)
File "/usr/local/lib/python2.7/dist-packages/luma/core/interface/serial.py", line 215, in data
self._write_bytes(data[i:i + tx_sz])
File "/usr/local/lib/python2.7/dist-packages/luma/core/interface/serial.py", line 291, in _write_bytes
self._spi.writebytes(data)
TypeError: Non-Int/Long value in arguments: b6768380.

Unable to access %s

Hi Im keen to use this with my Orange Pi Zero setup. Luma.oled is installed and working, and can display all the luma.examples. I'm using an SSD1306 controller OLED display connected via the i2c bus. When I run the following command from the oledterm directory:

sudo python3 oledterm.py --display ssd1306 --interface i2c --rotate 2

it blows up as follows:

File "oledterm.py", line 55
print "Unable to access %s, try running as root?" % (VIRTUAL_TERMINAL_DEVICE,)

Any clues what might be wrong?

Peter

Cursor

The console cursor isn't shown, making editing in full screen apps like vim not as convenient as it could be.

The virtual terminal device /dev/vcsa doesn't seem to expose the cursor location, any other way we can get it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.