DietPi i2c problem

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Aidan Hedley
Posts: 9
Joined: Tue Sep 08, 2015 3:58 pm

DietPi i2c problem

Post by Aidan Hedley »

Great little distro and super for my headless controller application.

I am trying to install a real time clock - , but after installing i2c-tools I am getting the following:
when i2cdetect used:
could not open /dev/i2c-0
I had the same issue with Raspian Wheezy and had to use raspi-config to enable i2c kernel hardware
There must be a file to configure , but I cannot find it, can anyone advise please?
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: DietPi i2c problem

Post by Fourdee »

Aidan Hedley wrote:Great little distro and super for my headless controller application.

I am trying to install a real time clock - , but after installing i2c-tools I am getting the following:
when i2cdetect used:
could not open /dev/i2c-0
I had the same issue with Raspian Wheezy and had to use raspi-config to enable i2c kernel hardware
There must be a file to configure , but I cannot find it, can anyone advise please?
Hi Aidan,

I'll have to look into this further. But in the mean time, you can still use raspi-config with DietPi to enable i2c:

Reinstall Raspi-Config:

Code: Select all

apt-get install raspi-config -y
Launch:

Code: Select all

raspi-config
I believe its under advanced > A7 I2C

Edit:
Turns out you can just add this to your /DietPi/config.txt
dtparam=i2c_arm=on
Reference

Kind Regards,
Dan
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Aidan Hedley
Posts: 9
Joined: Tue Sep 08, 2015 3:58 pm

Re: DietPi i2c problem

Post by Aidan Hedley »

AOK Thanks for the link to the config command.
I had tried Raspi-Config. reported errors and did not work.
Post Reply