trying to implement the adafruit example code for the bmp085, first it didnt like the syntax of the print statements ( which i read in verision 3.2.3 of Python, has become a function. added parentheses, then came up with the error below.
>>>
Traceback (most recent call last):
File "/home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_BMP085/Adafruit_BMP085_example.py", line 3, in <module>
from Adafruit_BMP085 import BMP085
File "/home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_BMP085/Adafruit_BMP085.py", line 59
print "Invalid Mode: Using STANDARD by default"
^
SyntaxError: invalid syntax
>>>
i've done some coding in turbo pascal,gwbasic,vb6, delphi6 and just starting to learn python....a kick in the right direction would help.
thank you
jws
bmp085 example code trouble
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: bmp085 example code trouble
Didn't you put the parentheses around the print statement?
Code: Select all
print( "Invalid Mode: Using STANDARD by default")
- jws302
- Posts: 2
- Joined: Mon Jan 14, 2013 5:23 am
Re: bmp085 example code trouble
went through and changed all instances of PRINT " " to PRINT (" ") this fixed all related error for PRINT. now have IOERROR, err syntax error.
guess i'll have to crash learn more python.
thanks for your help
i was using adafruits bmp085 code library as is. guess it needs a few tweeks since version B came out, plus says not tested yet.
guess i'll have to crash learn more python.
thanks for your help
i was using adafruits bmp085 code library as is. guess it needs a few tweeks since version B came out, plus says not tested yet.
Please be positive and constructive with your questions and comments.