(12-16-2016, 05:19 AM)KnReLe Wrote: The initial entry for the root password in /etc/shadow is *, meaning that there is no way to log-in as root initially, the only way to get a root login is to use sudo and set the password of root from that, as I showed.
Ahh... So basic... I forgot to so the sudo and was just typing "su" to get into it.
Still new to the linux environment, thanks for the help.
(12-16-2016, 02:49 AM)KnReLe Wrote: As you already can see your device via i2cdetect the necessary module and device is already present. Otherwise i2cdetect wouldn't have found the necessart /dev/i2c-1 file and been able to communicate with it to find your device.
In fact if you go look with something like
ls -l /dev/i2c*
it should already show something like:
crw-rw---- 1 root i2c 89, 0 Dec 10 14:44 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 Dec 10 14:44 /dev/i2c-1
Your guess at there being two i2c-busses is correct. The i2c-1 buss is the one you find on the PI-2-bus connector pins 3 and 5, which is presumably where you connected your ADS1115. Although the pin-out is similar to the one on the Raspberry Pi, the Pine does not have in-built pull-up resistors, but if your ADS1115 is on a breakout board such as the one that Adafruit sells, there will be pull-up resistors there, so communication will work, which is what you see here.
The other i2c buss, i2c-0, is connected to the socket labeled TP on the board, and it is meant to be used for the touchpad. It is not as easy to connect to, though there are some test pads on the bottom of the card underneath the Touchpad connector that could be accessed via fine-hand soldering. There are six of them there. Looking at the card from below, holding it so that the text («Designed in Silicon Valley, California....») is the right way (not upside down or sideways), the pads are towards the top right corner, in two rows of three, staggered.
(GND) (PH0/TWI0_SDA) (PH11)
(VCC_CTP) (PH1/TWI0_SCL) (PH4)
The middle ones thus are the SDA and SCL for the i2c-0 bus.
Back to your problem. Seeing as the kernel and hardware i2c subsystem is in order, (the i2cdetect -y 1 output indicates this), the problem could be in the python libraries used. They might contain knowledge if your device is a particular model of Raspberry Pi or some specific model of Beaglebone, but they probably don't know about the PineA64, hence they could not determine the default bus for platform, even though it would be the same (/dev/i2c-1) as Raspberry Pi has.
You don't say which github example this is, though googling returns the ones referring to the Adafruit board. You might have to delve deeper into the library being used to find out more about the Python subsystems that use i2c.
As for the root password, since you already have sudo working (for the i2cdetect and others) you can get a root shell with
sudo su -
and while in that, you can set whatever password you like for root, with
passwd root
(then enter your new password, twice)
Thanks for explaining the other bus on the TP connection.
Yes - the ls -l /dev/i2c* output was exactly as you showed.
I used the Adafruit github like you guessed.
https://github.com/adafruit/Adafruit_Python_ADS1x15
Nothing special or out of the ordinary - just going from the pine to a t-cobbler to breadboard.
Pine Ground --> ADS1115 Ground
Pine 5v --> ADS1115 VCC
Pine SCL --> ADS1115 SCL
Pine SLA --> ADS1115 SLA
Jumper from ADS1115 Ground to ADS1115 Addr (tried without jumper, too, same result)
I also tried feeding an input of 3.3v back into the A0-A3 inputs on the ADS1115 board and it never got past the bus identification error.
I greatly appreciate the help you have given.
I'm going to do a cleanup of my Pi 2 and try it with that instead. I was just hoping to used the Pine instead.
For what it is worth the application is intended to be a standalone data logger for a machine output - It is very appealing for many reasons to have a device like this completely separate from the control system, aside from reading a voltage output.