Connecting Datalogger to Sensirion Temp/Humidity Sensor
Hey everybody,
I was wondering how to connect my USB datalogger to my Sensirion SHT11 Temp/Humidity sensor. I am able to get the demo program for the usb datalogger to write random numbers to my flash drive sucessfully. I am also able to get the seperate SHT11 demo program to read the live temp/humidity values. I've read through all the documentation for both components but I can't get a straight answer to get the temp/humidity values to write to the·USB flash drive. Is there a program or diagram someone can give me to get this up and running. Thanks in advance!
Andrew
I was wondering how to connect my USB datalogger to my Sensirion SHT11 Temp/Humidity sensor. I am able to get the demo program for the usb datalogger to write random numbers to my flash drive sucessfully. I am also able to get the seperate SHT11 demo program to read the live temp/humidity values. I've read through all the documentation for both components but I can't get a straight answer to get the temp/humidity values to write to the·USB flash drive. Is there a program or diagram someone can give me to get this up and running. Thanks in advance!
Andrew
Comments
What data do you·want to log and how many bytes does it contain and how do you want to format the log file.
Jeff T.
The serial out to your logger is going to be virtually the same as when you used the example program with random numbers.
The important thing to remember with the VDAP write file instruction is to make sure you write exactly the number of bytes that you tell it your going to write.
something like this might work SEROUT tx,baud,("wrf",$20,0,0,0,$04,$0D,DEC2 (tC/10),".",DEC1 tC,$0D)
the decimal 2 , period and decimal 1 add up to 4 bytes, your final string may be much longer than that it's only a rough example.
I'm not sure how far you have got with this Andrew I hope this is helpful
Jeff T.
Can you tell me which Stamp you are using and which pins you have assigned to what on the logger.
Jeff T.
Jeff T.
Thanks for your time. I'll have to try that out.
Andrew
For your application where you want to bring the Sensiron and Datalogger together then you can leave the Sensiron code ·as it is. When you add the datalogger code to your Sensiron code you will need a minimum of four of the datalogger functions Initialize, Open for write, Write file and Close file. The data that you will want to write/log is all contained in the SHT11's debug instructions, take a close look at those debug instructions and pick out what you want to log.
If you want to learn a little more about the Datalogger grab the VDAP firmware instruction set and take a look at the attached code and document. The PDL BS2 code contains the most commonly used logger functions split into subroutines. The advantage of the subroutines is that you can look at each one individually knowing what it is supposed to do and try and better understand it. The PDL code is intended to run as a datalogger demo and does not include the SHT11.
Jeff T.
Edit: There is a typo in the first two files which has been corrected here
Post Edited (Unsoundcode) : 1/29/2008 3:23:35 PM GMT
· Thanks for your helpful replies to Andrew. I'm his teacher. We tried the program you attached but it locks up on the first line of the program, where it says, "Remove memory and press enter." When we remove the flash drive from the USB DataLogger and press 'enter' on the computer, it cycles us back to the program.
Our·stamp is a BS2. For what it's worth, we're running 2.0, not 2.5. Could this be part of·the problem? Thanks for your help! We look forward to more replies (and ultimately, to a solution!)
From New Hampshire,
Mark Kibler
·
Jeff T.
· Thanks for your help! Is installing PBASIC 2.5 as simple as downloading it, then running programs in that format? Does 2.5 work with the BS2 stamp?
Regards,
Mark
Like I said earlier the Sensirion code can be left·as it is. You will have to decide what information you require to log which you should be able to get from the variables used in the Sensirions debug instructions. Instead of or as well as displaying the variables you will also·write them to the logger.·To use the logger in conjunction with the Sensirion code you will need to Initialize the logger open a file for writing , write your data then close the file on completion.
hope this helps
Jeff T.
Is Basic Stamp Editor 2.4 the same as PBASIC 2.5? I've just dowloaded BSE 2.4...
Mark
Jeff T.·
Jeff T.
· It's Mr. Kibler. Jump over to my thread on this same forum if you would so we don't have two discussions going on the same topic at the same time, like Jeff T. suggested. Mike Green (and Tracy Allen) have posted some REALLY helpful information and program 'fixes' to·the thread.It's called 'Students and Teacher need help...') I think we're getting close to doenloading the data from the sensor to the USB DataLogger (though I don't quite understand all the program commands yet.) Someone suggested we contact Parallax support, but they simply sent us to this forum.
You did an OUTSTANDING job with our video teleconference with NASA today. Keep up the excellent work; we'll get this figured out!·Stick with·it until you understand it. That's what real learning is.
Mr.Kibler