I learned three things today

I have been atypically quiet on my website lately. That’s largely due to the fact that running the makerspace is taking up a crazy amount of my time, including all of the time I would have devoted to making things. But this weekend, I’ll have a table at the Rochester Children’s Book Festival, and I felt it was time to pull out some projects for the table.

A few years back, I made The Pi Projector which is a Raspberry Pi connected to a cool projector screen dev board. I was pretty happy to see that it was working really well even after sitting for a couple of years, so I did something stupid.

I updated the software.

Yep, you know all those recommendations that you should always keep your software up to date to avoid security problems? Well, I’m of that camp. However, there’s another camp that says never ever upgrade anything that is important days before it is needed. That latter camp is very smart. Sure enough, immediately after updating, my projector stopped working.

Fortunately, I have this website, which is the only place I stored any type of documentation of the project. I found out how to do the install and where I obtained the original instructions.

Unfortunately, if you go to that website, you’ll see that the domain is for sale and no longer contains useful information. Ugh.

Fortunately, there is this thing called the Wayback machine, which through some complex form of computing trickery, has captured snapshots of over 850 billion web pages over time. Seriously, I don’t know how they do it, but this is amazing.

So I took note of the time stamp on the post where I showed off the projector, and found a snapshot. There, I noticed some code that belongs in a file called config.txt as well as some that belongs in rc.local. I’ll put those snippets at the end of this post not because they help the story, but because who knows if I’ll be able to find them again.

Unfortunately, this still didn’t do the trick. For some reason, the splash screen never changed on the projector, and it took a bit of debugging to figure out why (and by debugging, I really mean guesswork).

I found that in the rc.local command, the value 3 was related to the particular communication channel (called i2c bus) that the projector is using. When I looked at the i2c devices in the /dev directory, I didn’t see any labeled 3, but I did see one labeled 11. After giving that a try, things started working again.

So, what did I learn throughout this whole process?

  • Always keep notes of your projects, preferably in a format that is searchable so you can refer back to them years from when they are recorded.
  • Know how to search the web, including how to search the web that no longer exists using the Wayback Machine.
  • Never, ever, EVER, update your hardware days before you need them for a program. That’s just stupid. (But I’ll probably do it again.)
Read more: I learned three things today

Add this to config.txt

# Add support for software i2c on gpio pins
dtoverlay=i2c-gpio,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=2

# DPI Video Setup
dtoverlay=dpi18
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
framebuffer_width=854
framebuffer_height=480
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87

dpi_output_format=458773
hdmi_timings=854 0 14 4 12 480 0 2 3 9 0 0 0 60 0 32000000 3

Add this to rc.local – make sure you confirm that the right bus is chosen for the value after -y

pi@raspberrypi:~ $ sudo nano /etc/rc.local

...
sudo i2cset -y 3 0x1b 0x0c 0x00 0x00 0x00 0x13 i
sudo i2cset -y 3 0x1b 0x0b 0x00 0x00 0x00 0x00 i

exit 0

Lastly, here’s the wiring information.

Wiring

The wiring is not difficult, but there are quite a lot of connections to make (27 to be exact). It is important to take your time and double check every connection before powering on the Raspberry Pi.

Below, are the pins and their numbering on the EVM (source):

Here’s how they map to the Raspberry Pi’s GPIO:

I’ve added P2_6 (5V) via GPIO pin 2 to power the EVM from the Pi or vice versa. A bridge is then required on the EVM from P2_6 to J3 using the M-F jumper wire. The EVM’s 5V/3A power supply is plenty to power both devices.

One thought on “I learned three things today

  1. I learned a similar lesson: away back when, I wrote a Turbo Pascal program to drive an LDC 601 spectrometer to collect spectra or do kinetics via the RS-232 port on the LDC and the COMM port on the computer. The computer used Win 95 and I used TP for W95. A year or so later, Win 98 came out, I bought TP for W98, went into the lab class and the program didn’t work. I don’t recall what I did for the lab exercise – I think I had the students do the exercise manually while I tried desperately to find the problem. It seems that either Windows changed how it handled the COMM port data or Turbo Pascal changed how it dealt with serial output. Eventually, I got the program revised and running.
    A few years later, when XP came out, I remembered and tested the system beforehand. Sure enough, it didn’t work. As a lark, I put in the original (Win 95) source code – success!
    It always annoyed me that our IT guys would “upgrade” the OS on lab computers, but never explain how we were supposed to upgrade data-acquisition systems. We weren’t supposed to keep old operating systems installed, even on air-gapped computers. But that’s another problem.
    Glad you were able to solve your problem. The internet is so fluid that it’s really not safe to rely on the existence of a web site from one year to the next.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.