Add SSD1306 to display temperature

I have an attached SSD1306 display in i2c mode that is tested and working in Raspbian.

How to make it work in OSMC?

Reason: Would like to display the CPU temp.

There must be a manual or some overlay that your supposed to load in config.txt, basically without trying to sound like an ass is to google it :slight_smile:

Well we all know that @toast never sounds like it :wink:

Seems this is a good starting point

Guess the only step that is different for OSMC is
Enable I2C and SPI modules directly with raspi-config tool
which I believe can be done via MyOSMC instead.

1 Like

Being away from home, I was curious how to do this from the command line.

Add these two lines to /boot/config.txt:

dtparam=i2c=on
dtparam=spi=on

and this line to /etc/modules:

i2c_dev

AFAICT, this should be sufficient. Running lsmod should show three new modules:

i2c_bcm2835             7201  0 
spi_bcm2835             7817  0 
i2c_dev                 7009  0

Thanks got it to work. Was missing the config.txt and modules lines.

lsmod didn’t display i2c_bcm2835

As an added note, I needed to ssh in as root and figure that out also. And yes I googled that too.

And for those that say google it… I did spent way too much time doing that for this issue. There wasn’t entries for SSD1306 and OSMC. OSMC is not Raspbian.
So putting … Google it in a comment helps nobody unless you did the google and see that there is info there in the first place.

So thanks dilthedog.

1 Like

Always happy to be of help. Fortunately, I have a Pi back home running Raspbian, so was able to figure out what raspi-config does.

Still wondering which of that step is not possible via MyOSMC?

I have no idea since my TV is far, far away. I was just curious to know what raspi-config does - and I hope it’s a useful reference for others.

raspi-config does nothing in OSMC. It is a raspbian command.

osmc@osmc:~$ sudo raspi-config

It looks like you’re familiar with Raspbian, or following a Raspbian tutorial.

OSMC is a media center operating system, and as such, we do things a little differently.

You should find all the options to configure your Raspberry Pi under My OSMC. If anything is
missing or you have any questions, let us know at https://discourse.osmc.tv

Indeed so. I suspect you missed the bit in post #6 where I said: