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
Democode errors
-
- 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
Kind regards
Stefan / SM7TIX
Stefan / SM7TIX
-
- 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
Seen it, been there.
I think it starts with problem in your other question (load the base sketch on the "Arduino") ?
I think it starts with problem in your other question (load the base sketch on the "Arduino") ?
Re: Democode errors
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
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
-
- 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
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!
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!
-
- 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
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.
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.
-
- 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
Kind regards
Stefan / SM7TIX
Stefan / 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
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
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
Stefan / SM7TIX
-
- 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
Hi,
See my post today New 'Topic Rangefinder issue'. I also was getting a fixed output from the rangefinder.
See my post today New 'Topic Rangefinder issue'. I also was getting a fixed output from the rangefinder.
Re: Democode errors
... you beat me to a solution, sm7tix. Thanks!
-E
-E
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460
Who is online
Users browsing this forum: No registered users and 19 guests