Page 3 of 5

Re: volts.py output problem

Posted: Wed Feb 21, 2018 3:38 am
by gpvillamil
Set to ATMega328p (3.3v 8mhz) - that will sort out all your problems! Eric B figured it out.

acojon wrote:I set the board to Arduino Pro or Arudino Pro Mini, and the Processor to ATmega328P (5v 16mhz)

Re: volts.py output problem

Posted: Wed Feb 21, 2018 3:47 am
by gpvillamil
Run sudo rpi-update, it will report the current version of the firmware and ask for confirmation to proceed. So just note the version and don't proceed.

Then dpkg-query -l will list installed packages with their version and description.

Kevin wrote:What commands should I run in terminal to check versions?

Re: volts.py output problem

Posted: Wed Feb 21, 2018 2:46 pm
by Nickw58
Hi,

This is my version of Pi Firmware


*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Performing self-update
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13403 100 13403 0 0 41057 0 --:--:-- --:--:-- --:--:-- 41240
*** Relaunching after update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** We're running for the first time
*** Backing up files (this will take a few minutes)
*** Backing up firmware
*** Backing up modules 4.9.35-v7+
#############################################################
WARNING: This update bumps to rpi-4.14.y linux tree
Be aware there could be compatibility issues with some drivers
Discussion here:
https://www.raspberrypi.org/forums/view ... 9&t=197689
##############################################################
Would you like to proceed? (y/N)

Re: volts.py output problem

Posted: Wed Feb 21, 2018 2:52 pm
by Nickw58
Hi,

The dpkg-query -l is a large output so I limited to i2c with a grep, not sure if this helps.

ii i2c-tools 3.1.1+svn-2 armhf heterogeneous set of I2C tools for Linux
ii libi2c-dev 3.1.1+svn-2 all userspace I2C programming library development files
ii python-smbus 3.1.1+svn-2 armhf Python bindings for Linux SMBus access through i2c-dev

Re: volts.py output problem

Posted: Thu Feb 22, 2018 1:48 am
by Kevin
Can you post an example of the exact command you entered? Been a long time since I used grep, this will save me 45 minutes of digging on google. :)

I'll do the same for smbus.

One other quick note - regarding the virtuanenv - when you install the virtualenv it's important to use the extra tag on that command to use installed packages. Also, when the virtualenv is active, python prints a different list of packages (I think that's using pip if I remember) compared to when the virtualenv is deactivated.

I wonder if somehow python or the system is using a different version of a package, or even not using a given package at all, wonder if the whole virtualenv thing may play into it.

I have some time lined up tomorrow I hope to spend on this some more.

Thanks again everyone. We'll figure this out.

Re: volts.py output problem

Posted: Thu Feb 22, 2018 5:35 pm
by gpvillamil
dpkg-query -l | grep -i i2c

Kevin wrote:Can you post an example of the exact command you entered? Been a long time since I used grep, this will save me 45 minutes of digging on google. :)

Re: volts.py output problem

Posted: Fri Feb 23, 2018 2:47 pm
by acojon
gpvillamil, Thank you for the speed settings, the sketch uploaded and ran properly! :)

The speed that the Aurduino is using to communicate to the PIC over I2C is too fast for the BusPirate to capture, so I don't have any useful data there.

I managed to corrupt the installation of Raspbian on the PI, it won't see the i2c devices, and it's acting pretty strange in general. I'll need to fish the Micro SD card out, re image it, re install and reconfigure. I'll be unable to help for a bit :)

Re: volts.py output problem

Posted: Fri Feb 23, 2018 3:21 pm
by gpvillamil
Do you like the rainbow? :)

My Raspbian install also acted strange after first installing the python software (high CPU for the python process, very erratic behavior of Arduino sketches that use I2C) but it cleared up after a reboot.

acojon wrote:gpvillamil, Thank you for the speed settings, the sketch uploaded and ran properly! :)

The speed that the Aurduino is using to communicate to the PIC over I2C is too fast for the BusPirate to capture, so I don't have any useful data there.

I managed to corrupt the installation of Raspbian on the PI, it won't see the i2c devices, and it's acting pretty strange in general. I'll need to fish the Micro SD card out, re image it, re install and reconfigure. I'll be unable to help for a bit :)

Re: volts.py output problem

Posted: Fri Feb 23, 2018 3:28 pm
by acojon
The rainbow was awesome :)

The behaviors persist after a reboot, so a reimage is the next step for me.

Re: volts.py output problem

Posted: Mon Feb 26, 2018 12:20 pm
by Nickw58
Hi Kevin,

FYI this is the version of smbus I'm running
ii python-smbus 3.1.1+svn-2 armhf Python bindings for Linux SMBus access through i2c-dev


Just checking I understand your last post regarding possible impact of the virtualenv on this issue. I ran ' dpkg -query -l ' with virtualenv activated and then deactivated and compared the output using the 'diff' command the output was the same.

(rover) pi@raspberrypi:~ $ dpkg-query -l > file1
(rover) pi@raspberrypi:~ $ deactivate
pi@raspberrypi:~ $ dpkg-query -l > file2
pi@raspberrypi:~ $ diff file1 file2
pi@raspberrypi:~ $