Shop OBEX P1 Docs P2 Docs Learn Events
Temperature humidity sensor/programming question — Parallax Forums

Temperature humidity sensor/programming question

pengsy1988pengsy1988 Posts: 6
edited 2009-04-29 03:04 in Accessories
I am using the #28018 sensirion temp/humidity sensor, and I had a
problem with the code from this website
http://www.parallax.com/Portals/0/Downloads/docs/prod/acc/SensirionDocs.
pdf
program does not keep the data, everytime it reads the data, it
deleletes the previous data.
And I want data to be recorded so that I can have TEMPERATURE/HUMIDITY vs TIME
Is there anyway that I can modify the
program and get the data recorded?
Could anyone give any suggestions?
Thank you very much

Comments

  • kwinnkwinn Posts: 8,697
    edited 2009-04-28 03:13
    Since the sensor can be read this seems to be a Basic Stamp programming issue. Perhaps you should post it in the Basic Stamp forum.
  • FranklinFranklin Posts: 4,747
    edited 2009-04-28 03:25
    you are right, that is what that code does so if you want it to do something else you need to change it. Where do you want to store the data and how will you get the timestamp? You can send the debug info to a terminal program that will save it to a file if that's all you need.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • pengsy1988pengsy1988 Posts: 6
    edited 2009-04-28 14:37
    I want the data to store in a text file, or just keep the data on the display window, so that I can copy it and make a plot. Could you explain more detailedly, like what command I use and what structure? Thanks
  • pengsy1988pengsy1988 Posts: 6
    edited 2009-04-28 14:41
    What does "send the debug into a terminal program mean?" What commands do I write and where do I put it? Thanks
  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-28 15:48
    Download the Basic Stamp Syntax and Reference Manual from Parallax (www.parallax.com/tabid/440/Default.aspx) and read the chapter on the DEBUG statement.

    You should also look at Stamp Plot Pro which is free for non-commercial use (www.parallax.com/tabid/441/Default.aspx). This would allow you to easily download the data to your PC and display it as a graph or table.

    Post Edited (Mike Green) : 4/28/2009 3:53:51 PM GMT
  • Jessica UelmenJessica Uelmen Posts: 490
    edited 2009-04-28 16:45
    Hello,

    In addition to the links that Mike provided, you can also check out Smart Sensors and Applications, Chapter 6. This chapter takes you step-by-step through datalogging and displaying the results in Excel.

    Hope this helps!

    Jessica

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jessica Uelmen
    Education Department
    Parallax, Inc.
  • pengsy1988pengsy1988 Posts: 6
    edited 2009-04-29 02:59
    Thanks for all of your references.
    But my problem is that I need to "write to file".
    Could you tell me what is the command of "write to file" in PBASIC? I cannot find that.
    Thanks
  • FranklinFranklin Posts: 4,747
    edited 2009-04-29 03:04
    You don't "write to file" in pbasic you serout to the com port and capture the serial data to a file with a program on the computer. What program you use is up to you all it needs to do is read data from the serial port and process it in the way you want.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.