We are trying to switch from a LED controlled solar hot water heater system to one which uses a Raspberry Pi A (we need the Pi anyway because we wish to send temps to web) an H-Bridge, pysolar - a program which will give the Sun's position if given Latitude, Longitud, etc., an IMU (to help pysolar locate the position of the solar collector) and Jay Dosher's program which brings everything together and finally outputs run commands to the motor.
We have been trying to debug Jay's program. Since we don't program, we think we've done pretty well on the Pi. We suspect he made the original progam in Python-2.x and since we didn't realize this, we've been trying to use/debug it in Python-3.x. We've gotten to line 337 or so of his 450 line program, so we think we're pretty much there - lol. We've had the most problems with what appear to be strings and numbers as you can see below - our most recent error
Traceback (most recent call last):
File "solarrobot7-core.py", line 373, in <module>
writeline=("actual_elevation: " + str(round((float(getcurangle())),1))+ "\n")
TypeError: float() argument must be a string or a number
Some helpful soul on Stackoverflow i think it was suggested we use some sort of print statement to figure out what values getcurangle actually has but we don't know where to place what - lol.
Any help would be appreciated. Have a great day!
P.D. The uploaded file solarrobot7-core.txt is really a .py file and is the file we are working on.
The other file, solarrobot7-core_Original_no_Cambiar.txt is Jay Dosher's original file. It, too, is a .py file.
We have been trying to debug Jay's program. Since we don't program, we think we've done pretty well on the Pi. We suspect he made the original progam in Python-2.x and since we didn't realize this, we've been trying to use/debug it in Python-3.x. We've gotten to line 337 or so of his 450 line program, so we think we're pretty much there - lol. We've had the most problems with what appear to be strings and numbers as you can see below - our most recent error
Traceback (most recent call last):
File "solarrobot7-core.py", line 373, in <module>
writeline=("actual_elevation: " + str(round((float(getcurangle())),1))+ "\n")
TypeError: float() argument must be a string or a number
Some helpful soul on Stackoverflow i think it was suggested we use some sort of print statement to figure out what values getcurangle actually has but we don't know where to place what - lol.
Any help would be appreciated. Have a great day!
P.D. The uploaded file solarrobot7-core.txt is really a .py file and is the file we are working on.
The other file, solarrobot7-core_Original_no_Cambiar.txt is Jay Dosher's original file. It, too, is a .py file.
Attachments
Last edited: