Tinkering with Raspberry (and other things)

1 Comment

Real Time Clock (Software – I2C)

Our RTC module from the Hardware posting “speaks” I2C and the Raspberry has some GPIO-pins for just that. Unfortunalety, in the default configuration the Raspberry does not understand I2C. We need to modify some files, have some packages installed and then we are ready to go.

One word of warning: I strongly discourage you from connecting anything to the Raspberry’s GPIO header when the Raspberry is running and/or connected to power. Before fiddling with hardware halt the system, disconnect the power and after you’ve done that, connect what you want.

In order to have I2C on the Raspberry we need to make sure that the proper kernel modules are loaded. Linux/Unix has the ability to dynamically load modules when they are needed but there also numerous modules that are loaded on boot. Think of a kernel module as a low-level driver for some specific hardware. To then interact with hardware, the so called “devices” are added to the filesystem. These are special “files” that serve as the connection between programs and the real hardware. One example was the parallel printer device from my Parallel Printer post.

The Raspberry has a file that blacklists modules the kernel should ignore. This means that even when the kernel detects new hardware, the module does not get loaded. This is to prevent special cases, where one or more modules support the same device which would cause erratic behaviour. The modprobe man page explains this even better. Continue reading



Parallel Thermoprinter

Another day, another gadget.

I recently acquired a miniature thermoprinter just for fun because spending 14 EUR (that is 18.47 USD at the time I am writing this) was a no-brainer. I will skip one beer in the beer garden. NOT. It’s 37 °C outside…
For those interested, here is the link to the German ebay-offer.

Sorry. Back to the printer. It has originally a parallel port but comes packaged with a usb-parallel adapter cable. The question was: will the Raspberry work with an adapter and subsequently, the printer. Things turned out to be not that simple. Missing modules, the usual permission problems and the German language with its funny Umlauts (ÄÖÜ).


Continue reading