Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: CharlieDelta on October 15, 2020, 12:30:35 PM
-
OK I am here again and this time I would like some help getting RPi i2c bus working using Python.
I understand I need an extension (I think) that involves i2c tools and smbus. I looked at various searches on this forum for i2c and smbus and it looks like I should have to hand something like "....python-smbus.tcz added to repo"
[care of suicidal_orange. Re: python smbus extension? « Reply #5 on: April 20, 2014, 06:04:50]
but the Apps prog does not reveal anything to do with smbus or i2c
Any assistance would be gratefully received
BTW I am running piCore 11.0 and Python 3.8 and RPi 1B (2012)
-
You will likely need to load the i2c-dev kernel module manually.
-
Thank you Paul
-
Thank you Paul for all your efforts
sudo modprobe i2c-dev works and creates my desired /dev/i2c-1 and i2cdecect -y 1 works as well.
Besides of loading i2c-dev manually, Is there an other way to create the /dev/i2c-1 entry?
Silvio
-
Hello,
my setup is
pi 2W
MPU 9250
tiny linux piCore 13.1.0
RTIMUlib2
In my python file when imu.IMURead() I get (0,0,0) !
in CLI when i2cdetect -y 1 I get Error: Could not open file `/dev/i2c-1'
I try sudo modprobe i2c-dev, but it change nothing.
Thank you, I somebody can help me to see my IMU device.
-
I am stuck since one week!
sudo modprobe i2c-bcm2835
sudo modprobe i2c-dev
i2cdetect -y 1
And I get always this :
Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory
When modinfo i2c_dev
filename: /lib/modules/5.10.77-piCore-v7/kernel/drivers/i2c/i2c-dev.ko.gz
author: Simon G. Vogl <simon@tk.uni-linz.ac.at>
author: Frodo Looijaard <frodol@dds.nl>
description: I2C /dev entries driver
license: GPL
srcversion: FAA806EAA87DC7C27E86ABB
depends:
intree: Y
vermagic: 5.10.77-piCore-v7 SMP mod_unload modversions ARMv7 p2v8
What's wrong?
They is some specilal driver for the PI zero 2W?
-
Is the bus enabled in your config.txt?
-
I don' make a config.txt file !
To enable the i2c Bus, I saw that this file should contain :
dtparam=i2c_arm=on
Is it right?
Where should I put this file?
I try in /mnt/mmcblk0p1 but it disapear on reboot!
I would like to access to the wiki but I can't "Permission Denied" with login/password of the forum.
-
Hi vincenthure
If you mount mmcblk0p1 you should find it there.
-
Thank for your help.
I finaly see my IMU on the i2C bus ;D
-
My IMU is now working well
I have one more question :
I can get the data only when I call my program with sudo.
Is it possible to get the data without the admin mode?
-
Hi vincenthure
You could try adjusting the ownership of /dev/i2c-1:
sudo chown root:staff /dev/i2c-1
-
Thank you
So easy when somebody explain for you!
-
Hi vincenthure
You are welcome. :) Glad I could help.