On a sunny day (Sun, 27 Jan 2019 17:19:34 +0000) it happened Adrian
wrote in :
>I'm having problems with i2c, and after a couple of hours trying all the
>options that Google throws up, I'm stumped.
>
>Pi 3 4.14.79-v7+
>
>sudo i2cdetect -y 1
>Error: could not open file '/dev/i2c/1': No such file or directory
>
>cat /etc/modules
>i2c-bcm2708
>i2c-dev
>
>tail /boot/config.txt
>
>dtparam=i2c=on
>dtparam=i2c_arm=on
>dtparam=i2c_vc
>device_tree_param=i2c=on1=on
>dtparam=spi=on
>dtparam=i2s=on
>
>/etc/modprobe.d/raspi-blacklist.conf is empty
>
>Any suggestions ?
Well, I use a lot of i2c also on raspberry, and I use a C library for that
do the I/O not via the dedicated pins but via any pin I want.
I2c is largely time insensitive (as for example to a task switch) so it
always works.
Want the library? I can publish the c code here.
I use actualy 3 pins, scl (output), sda_in (input), and sda_pulldown (output
via pulldown diode connected to sda line).
If you scroll down on this page you see a circuit diagram with 2 separate i2c
busses:
http://panteltje.com/panteltje/xgpspc/index.html
actualy the library is the .tgz link at the bottom of the page.
Saved time, uses a hundred of more times...
All assuming you know C.and hardware.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|