Democode errors

The more technical aspects of Spirit, and carry-over discussion from Kickstarter updates.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
sm7tix
Posts: 31
Joined: Sat Oct 28, 2017 4:21 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Democode errors

Postby sm7tix » Sat Feb 10, 2018 7:06 pm

When i run the volts.py and rangefinder.py i get
(rover)pi@raspberrypi:~/rover/democode $ python volts.py
Battery Voltage: Wrong register replied
0
Wrong register replied
0
Wrong register replied

Where should i start debug?
Kind regards
Stefan
Kind regards

Stefan / SM7TIX

Bastian
Posts: 21
Joined: Sun Oct 22, 2017 5:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Democode errors

Postby Bastian » Sat Feb 10, 2018 9:58 pm

Seen it, been there.

I think it starts with problem in your other question (load the base sketch on the "Arduino") ?

User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Re: Democode errors

Postby esba1ley » Sun Feb 11, 2018 1:24 am

I'm debugging the same problem. I hope to figure it out this weekend.
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460

Bastian
Posts: 21
Joined: Sun Oct 22, 2017 5:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Democode errors

Postby Bastian » Sun Feb 11, 2018 11:07 am

Rangefinder.py shows the same problem.

Looks like comms.ino returns strange values (255,255,255,255,255)?
-----------------------------------------------------------------------------------------
(rover) pi@Rpi3bV1-2:~/rover/democode $ python volts.py
Battery Voltage: register requested = 21
Wrong register replied 255 [255, 255, 255, 255, 255]
0
(rover) pi@Rpi3bV1-2:~/rover/democode $ python rangefinder.py
Rangefinder: register requested = 66
Wrong register replied ?? 255 [255, 255, 255, 255]
0
-------------------------------------------------------------------------------------
The code is a bit of spaghetti-trail to me. Would be easier if I could use a straightforward, plain sketch to test the comms and registers used and than trail back spirit_core.py. Halas I cannot upload a sketch (another problem not solved yet). Lets keep posted!

Kevin
Posts: 180
Joined: Tue Jul 28, 2015 12:56 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Democode errors

Postby Kevin » Sun Feb 11, 2018 6:44 pm

The rangefinder and volts scripts talk to the PIC not the Arduino, but the pre-installed demo on the Arduino does kind of flood the I2C bus reading the rangefinder. Putting the other PiControl behavior on the Arduino should clear this up.

This "wrong register replied" comes from the spirit_core.py I believe and errors this if the response back from the PIC processor doesn't have the correct register name - it would indicate some problem on the I2C bus which could be explained by flooding the bus.

sm7tix
Posts: 31
Joined: Sat Oct 28, 2017 4:21 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Democode errors

Postby sm7tix » Sun Feb 11, 2018 7:03 pm

Kind regards

Stefan / SM7TIX

sm7tix
Posts: 31
Joined: Sat Oct 28, 2017 4:21 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Democode errors

Postby sm7tix » Sat Mar 03, 2018 9:36 pm

I have solved it for me by having this in /boot/config.txt
dtoverlay=i2c-bcm2708
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on

Volts.py give
Battery Voltage: 4.078
4.078
4.078

rangefinder.py givs
Rangefinder: 130
130
130

but i dont know how to test rangefinder.py. Allways give this answer.
Stefan
Kind regards

Stefan / SM7TIX

Nickw58
Posts: 20
Joined: Sun Oct 15, 2017 11:13 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Democode errors

Postby Nickw58 » Thu Mar 08, 2018 1:48 pm

Hi,

See my post today New 'Topic Rangefinder issue'. I also was getting a fixed output from the rangefinder.

User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Re: Democode errors

Postby esba1ley » Sun Mar 11, 2018 4:50 am

... you beat me to a solution, sm7tix. Thanks!

-E
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 20 guests