[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 574: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 630: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
Plum Geek Forum • Democode errors
Page 1 of 1

Democode errors

Posted: Sat Feb 10, 2018 7:06 pm
by sm7tix
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

Re: Democode errors

Posted: Sat Feb 10, 2018 9:58 pm
by Bastian
Seen it, been there.

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

Re: Democode errors

Posted: Sun Feb 11, 2018 1:24 am
by esba1ley
I'm debugging the same problem. I hope to figure it out this weekend.

Re: Democode errors

Posted: Sun Feb 11, 2018 11:07 am
by Bastian
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!

Re: Democode errors

Posted: Sun Feb 11, 2018 6:44 pm
by Kevin
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.

Re: Democode errors

Posted: Sun Feb 11, 2018 7:03 pm
by sm7tix

Re: Democode errors

Posted: Sat Mar 03, 2018 9:36 pm
by sm7tix
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

Re: Democode errors

Posted: Thu Mar 08, 2018 1:48 pm
by Nickw58
Hi,

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

Re: Democode errors

Posted: Sun Mar 11, 2018 4:50 am
by esba1ley
... you beat me to a solution, sm7tix. Thanks!

-E