Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: Zenkazio on November 16, 2020, 12:46:01 PM
-
So far i really like piCore and I got everything (python3.8 with gpio, wifi) working very well.
I would like to use i2c for more sensors, but I cant get it working. I tried to activate it in the config.txt
and I tried it with an older version of "i2c-tools.tcz" for piCore 3.x, but with this i2cdetect causes a syntax error
is there another recommendation what to do/try next?
Zenkazio
-
You need to manually load
In your config.txt, make sure you have
dtparam=arm_i2c=on
And then you need to manually load i2c-dev if you want to use i2ctools.
-
So far i've tried the following commands in config.txt
dtparam=arm_i2c=on
dtparam=i2c_arm=on
dtoverlay=i2c-gpio
dtparam=i2c=on
dtparam=i2c-dev=on
if use "tce-load -i i2c-dev" it tells me that it cant not find i2c-dev.tcz
what do you mean with load manually?
-
Whenever making changes to config.txt Do not stab in the dark. Refer to the Rpi documentation https://www.raspberrypi.org/documentation/configuration/config-txt/README.md
i2c-dev is a kernel module included in the base. This module is only so you can browse the device interface with i2c-tools, it should not be needed for python to access the bus.
sudo modprobe i2c-dev
-
Yesterday I flashed a complete new piCore 12.0 without any more extensions.
I wrote "dtparam=i2c_arm=on" to config.txt
and used "sudo modprobe i2c-dev"
without getting any errors
i2cdetect still gets me
"-sh: i2cdetect command not found"
also the documentation of the python module "smbus" explicitly requires i2c-dev which sadly means I cannot just ignore it.
Today I will try a few other config.txt settings stated in the documentaion and partly already stated in this forum.
-
I believe i2c-tools uses perl, is the perl5 extension loaded? What is the first line of the file i2cdetect?
-
Updated ic2-tools posted to piCore-12.x repos - not tested.
-
after downloading i2c-tools.tcz it finally works!
with
dtoverlay=i2c1 in config.txt
in terminal
tce-load -i i2c-tools.tcz
sudo modprobe i2c-dev
i2cdetect -y 1