Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

bmp085 example code trouble
Moderators: adafruit_support_bill, adafruit

bmp085 example code trouble

by jws302 on Wed Jan 23, 2013 1:41 pm

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
jws302
 
Posts: 2
Joined: Mon Jan 14, 2013 5:23 am

Re: bmp085 example code trouble

by adafruit_support_rick on Wed Jan 23, 2013 3:28 pm

Didn't you put the parentheses around the print statement?
Code: Select all | TOGGLE FULL SIZE
print( "Invalid Mode: Using STANDARD by default")

adafruit_support_rick
 
Posts: 18388
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: bmp085 example code trouble

by jws302 on Thu Jan 24, 2013 12:37 pm

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.
jws302
 
Posts: 2
Joined: Mon Jan 14, 2013 5:23 am