6:59 pm
May 11, 2016
Steffan said
You are missing quite a bit of code. You need to send the register address you are trying to read first before reading the data. I attached an example VI we had for a BMP180 demo you can use as a starting point.
thank you very much.
I've studied your very helpful VIs and I think I understood.
Now BMP180 works fine.
But now i have an other problem, from yesterday when I try to compile a VI with RTC i receive this error and I don't know why
C:\Users\Michele\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp\temp.ino: In function 'void Read_RTC_Time_and_Format(String*, boolean, unsigned char, boolean, unsigned char)':
temp:102: error: '_Wire' was not declared in this scope
_Wire[Interface_253]->beginTransmission(Slave_Address_225);
^
temp:120: error: '_Wire' was not declared in this scope
_Wire[Interface_253]->requestFrom(Slave_Address_225, Const1583, (uint8_t)NULL);
^
exit status 1
'_Wire' was not declared in this scope
thanks
Michele
4:29 am
March 12, 2015
miche91 said
hi,your example show how to read and compensate obly the temperature, right?
what about pressure?
thanks
Michele
Yes that example only shows temperature. But it should be trivial to add pressure. Just read the appropriate calibration constants and readings for pressure per the datasheet.
9:37 pm
May 11, 2016
Hi,
I've tried to built a VI aroud read temperature and pressure, but I can't understant how I can calculate "B3", "B4" and "B7" in "calculate true pressure" window on the Bosch datasheet (see attached), can anyone help me?
In my VI I perfectly calculate true temperature and read unconpensed pressure
thanks
10:32 pm
March 12, 2015
That is a left shift and (unsigned long) is a cast. You need to be able to understand this C code to be able to reproduce it in LabVIEW. It would probably be more efficient to write a LabVIEW wrapper around a readily available BMP180 library. You could check this forum to see if anyone has done that already but I am not aware of it. If there is a demand for it, this is something we could do but it would not happen right away.
4:49 pm
Steffan said
You are missing quite a bit of code. You need to send the register address you are trying to read first before reading the data. I attached an example VI we had for a BMP180 demo you can use as a starting point.
miche91 said
Steffan said
You are missing quite a bit of code. You need to send the register address you are trying to read first before reading the data. I attached an example VI we had for a BMP180 demo you can use as a starting point.thank you very much.
I've studied your very helpful VIs and I think I understood.
Now BMP180 works fine.
But now i have an other problem, from yesterday when I try to compile a VI with RTC i receive this error and I don't know why
C:\Users\Michele\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp\temp.ino: In function 'void Read_RTC_Time_and_Format(String*, boolean, unsigned char, boolean, unsigned char)':
temp:102: error: '_Wire' was not declared in this scope
_Wire[Interface_253]->beginTransmission(Slave_Address_225);
^
temp:120: error: '_Wire' was not declared in this scope
_Wire[Interface_253]->requestFrom(Slave_Address_225, Const1583, (uint8_t)NULL);
^
exit status 1
'_Wire' was not declared in this scope
thanks
Michele
Hi Steffan, I have the same problem as this one... '_Wire' was not declared in this scope.
I have checked that I have the "I2C Open" vi in the initialisation, so I have attached my zipped up LabVIEW source code. I would appreciate and help you may be able to give.
Many thanks
Alan K.
5:42 pm
March 12, 2015
It compiled fine for me. Are you sure you are stating the correct error or is this possibly your issue?
9:57 am
Thanks for checking that Steffan, and for the suggestions.
I have attached the complete error listing from the compiler, which I notice also includes an error relating to the Serial comms which have been working fine.
Is it possible that this relates to file locations?
Thanks again for your help.
Alan K.
5
1 Guest(s)