volts.py output problem

The more technical aspects of Spirit, and carry-over discussion from Kickstarter updates.
gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm

Re: volts.py output problem

Postby gpvillamil » Wed Feb 21, 2018 3:38 am

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)

gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm

Re: volts.py output problem

Postby gpvillamil » Wed Feb 21, 2018 3:47 am

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?

Nickw58
Posts: 20
Joined: Sun Oct 15, 2017 11:13 am

Re: volts.py output problem

Postby Nickw58 » Wed Feb 21, 2018 2:46 pm

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)

Nickw58
Posts: 20
Joined: Sun Oct 15, 2017 11:13 am

Re: volts.py output problem

Postby Nickw58 » Wed Feb 21, 2018 2:52 pm

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

Kevin
Posts: 180
Joined: Tue Jul 28, 2015 12:56 am

Re: volts.py output problem

Postby Kevin » Thu Feb 22, 2018 1:48 am

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.

gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm

Re: volts.py output problem

Postby gpvillamil » Thu Feb 22, 2018 5:35 pm

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. :)

acojon
Posts: 6
Joined: Sat Feb 17, 2018 12:39 am

Re: volts.py output problem

Postby acojon » Fri Feb 23, 2018 2:47 pm

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 :)

gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm

Re: volts.py output problem

Postby gpvillamil » Fri Feb 23, 2018 3:21 pm

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 :)

acojon
Posts: 6
Joined: Sat Feb 17, 2018 12:39 am

Re: volts.py output problem

Postby acojon » Fri Feb 23, 2018 3:28 pm

The rainbow was awesome :)

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

Nickw58
Posts: 20
Joined: Sun Oct 15, 2017 11:13 am

Re: volts.py output problem

Postby Nickw58 » Mon Feb 26, 2018 12:20 pm

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:~ $


Who is online

Users browsing this forum: No registered users and 1 guest