Tuesday, March 25, 2014

oled and beaglebone black testing


Thanks to the existing libraries from Adafruit (BBIO) and py-gaugette (http://guy.carpenter.id.au/gaugette/) I was able to extend the display capabilities using Python.  Video shown above testing for display and speed.

I also wrote my own font rendering, I built up a 8x16 pixel font set based on whatever my Ubuntu desktop had on its /usr/share/ directory that looked good enough when I was trying to figure out how to render ttf into bitmaps.  Thanks for the Python ImageFont module I was able to dump a bitmap font in to Python source code.

I also sped up font rendering by a lot by directly manipulating the image buffer at the byte level.  There is a lot more optimization that can be done but I think the performance is good enough for me to build up that menu system I am thinking about.

JondZ
March 2014


OLED Display + Buttons on the Beaglebone Black



It is a lot of work to make one of these.  It took me a whole night but it would be very useful for me.  At the moment I am developing a good python-based menu system to go with this.

Back View
 
Front View
Mounted on a Beaglebone Black
They all fit on the Beaglebone Case!

A good pocket computer.  I'll make up another one, a BLUE OLED from ebay just came in.

JondZ / March 2014

Friday, March 21, 2014

Writing custom python-based menu system on a small lcd

Beaglebone Black + SSD1306 + Buttons Prototype
I wish I could write in C right now to write drivers for this beautiful display.  I could have used lcdproc or something similar that already has a menu system.

As it is I am writing a custom Python program that drives a simple menu system.  Eventually I will load this mini computer with my useful programs so I can carry it along.

Show here is the prototype for a simple OLED display with some buttons connected to a BeagleBone Black.  The menu system for now supports simple navigation (up, down, etc) and supports submenus.  Lots more work to be done.  I used drivers from Adafruit for GPIO and the "py-gaugette" library for basic screen initialization, pixel and text rendering work.  I had to write a few more pixel level stuff like reversing pixels.  Not such a problem with Python.

At least I can figure the basics of this OLED unit, I can deal with pixel memory addressing and bit masking, but I just cannot figure yet the hardware screen initialization stuff.

Friday, March 07, 2014



So..I am trying to understand what I am working with, getting back to basics.  Usually I follow instructions such as wiring diagrams without really understanding how they work. 

Here is a MCP23017 port expander connected to a BB Black, so I can understand more clearly the IO communications, pullup resistors, and a little bit of I2C.  Its really fun.  Unfortunately I can only do this with python for now; maybe later on I can have the time to review C again.

JondZ

Tuesday, February 11, 2014

Beaglebone black with LCD: useful

Uploading Files
So far I have ported two of my programs to the beaglebone black so I dont have to look for a computer to do common tasks---there are some kind of bugs still, such as the display freezing but hopefully I can figure them out eventually.

The programs I loaded so far that I would actually use are:

1.  A picture uploader.  I have a custom website for my digital pictures.  A long time ago I used to have a computer with an lcd in front of it so all I had to do was put the camera card and press a button and out the pictures go into the website.  Now I have the uploader client ported to beagle bone black so I can upload pictures from anywhere with an internet connection (wired internet, for now).

2. A generic memory card copier.  You never know when you just have to backup a card.

On a related note, the 8x2 character LCD has looked good enough to win me a beaglebone case in a contest :-)

JondZ

Friday, February 07, 2014

Finally, I can carry around a linux gadget with a display.  This will be very useful for me.  This one took me a really long time to build though (I have not that much experience in soldering).

This linux beaglebone black with an attached 8x2 display is running lcdproc (the LCDd display server).  


Soldering wires before putting on the LCD.

Mounted on a Beaglebone Black

JondZ

Friday, January 31, 2014

beaglebone black debian-post installation (USB multifunction Gadget configuration)



After installing the debian image into the beaglebone black as recommended by the armhf website I found that the usb functions did not work.

This post documents a few steps needed to enable the usb host storage and the usb network.








/etc/modules


g_multi file=/home/shared.disk

Create a /home/shared.disk block file (such as "dd if=/dev/zero of=shared.disk bs=1M count=32" or whichever size you want).  Later on partition this disk using fdisk or mount in another desktop and partition from there.  One thing I did find out is that my windows desktop did not want to mount the disk unless there is a partition in the block file so definitely do an fdisk /home/shared.disk and create software partitions in there.

USB Network

This is as close to the original factory usb network setup as I can.  This configures the beaglebone black as 192.168.7.2 on the usb network, and gives the desktop an IP of 192.168.7.1 (via dhcp).


/etc/network/interfaces

# JondZ Thu Jan 30 15:04:27 UTC 2014 added usb0
auto usb0
iface usb0 inet static
      address 192.168.7.2
      netmask 255.255.255.252
/etc/udhcpd.conf
# JondZ Thu Jan 30 15:25:13 UTC 2014 dhcp server for usb0
start      192.168.7.1
end        192.168.7.1
interface  usb0
max_leases 1
options subnet 255.255.255.252


The package udhcpd ( a dhcp server) needed to be installed, of course.


JondZ




I reclaimed this blog.

Yehey I reclaimed my blog.  This blog was created way back from 2005, I had to temporarily setup my old email server again just to receive the password recovery notice.


I stopped serving mail out of own server a really long time ago--it was just easier to just sign into google.  I may have setup a mailserver again for automation stuff.

JondZ

Creating ipip tunnels in RedHat 8 that is compatible with LVS/TUN. Every few seasons I built a virtual LVS (Linux Virtual Server) mock up ju...