Shop OBEX P1 Docs P2 Docs Learn Events
Do I need to change the code to use the Sensiron temp. sensor with the bs2px? — Parallax Forums

Do I need to change the code to use the Sensiron temp. sensor with the bs2px?

P!-RoP!-Ro Posts: 1,189
edited 2008-12-06 00:20 in BASIC Stamp
I just used the sample code on the page for it here and converted it into code for the bs2px. However, these are the results I'm getting back:
SHT1x Demo
soRH..... 65535
rhLin.... 2623.1%
rhTrue... 471.8%
tC....... 615.3º
tF....... 1139.5º
Do I need to change the code or is it a different problem?

Post Edited (Pi Guy) : 11/30/2008 12:59:41 AM GMT

Comments

  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-29 21:02
    It could be that you're on the planet Venus.

    Otherwise it's probably a code problem.
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-11-29 21:09
    I also am wondering if the chip may be damaged. I just don't know how to test it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG

    Post Edited (Pi Guy) : 11/30/2008 12:59:57 AM GMT
  • FranklinFranklin Posts: 4,747
    edited 2008-11-29 21:09
    Attach your program so we can see what you are running.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-29 21:12
    Yeah, I'd like to know what you mean by "converted". I don't see anything in that code that should require conversion except the $STAMP directive. I may have missed something, though.

    Have you looked through this?

    www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol3/col/nv91.pdf
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-11-29 21:14
    Same as the Parallax code, but for your convenience here it is.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG

    Post Edited (Pi Guy) : 11/30/2008 1:00:16 AM GMT
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-11-29 21:25
    Hmm, somethings not adding up. Look at the diagram from sylvie's link, then look at the one on the documentation for the chip. They are both·different.

    http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol3/col/nv91.pdf

    Sensirion Kit Documentation (.pdf)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG

    Post Edited (Pi Guy) : 11/30/2008 1:00:36 AM GMT
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-29 21:36
    Pi Guy -

    Of course they are. Sylvie was directing him to a Nuts and Volts column, NOT the product page.

    Regards

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-29 22:00
    He'd already posted a link to the code on the Products page. I thought he might like to see alternative code that might help him test/troubleshoot his SHT1x (man, couldn't they have picked a different name?).

    Am I correct in assuming that there's nothing to adjust with the SHIFTIN/SHIFTOUT commands to account for using a BS2px instead of a BS2?
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-29 22:13
    sylvie -

    As far as I know you are correct that there are no changes to SHIFTIN and SHIFTOUT based on which Stamp platform you use.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-11-29 22:21
    I'm still here, Bruce. Roboluvr and all. I still don't know why the two diagrams are different, though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG

    Post Edited (Pi Guy) : 11/30/2008 1:01:02 AM GMT
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-30 00:23
    Pi Guy -

    You may want to check your PM's before posing (sic) again. Just a "word to the wise..." .

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-11-30 01:00
    Sorry Bruce.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
  • FranklinFranklin Posts: 4,747
    edited 2008-11-30 03:07
    The diagrams are different because one is the raw chip and one is the parallax module. If you look at the connections to the chip on the module they are the same.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-11-30 03:41
    Thanks Franklin. By any chance would you still know how to check it to see if is actually working? Or am I left to assume?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
  • FranklinFranklin Posts: 4,747
    edited 2008-11-30 04:03
    Also your code is not the same as in the demo. I would use the actual demo code and see what you get.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-12-04 01:49
    I double-checked the code and circuits, but it still doesn’t work. It must be a goner.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2008-12-04 22:36
    If I remember correctly, those are the values/results I got when I changed from a homework board to a PDB and accidently crossed the data and clock lines. Check your wiring or flip your pin connections in your program to make sure. (I say this because I occasionally put the "first" connection into P1, instead of P0 and miss it when I verify my circuit visually) Verify your pull-ups and pull downs?

    I have·12 versions of·code for the BS2/BS2P40 (one that works with two sensors at the same time, see·http://forums.parallax.com/showthread.php?p=690671·), but I don't see anything·in them·that causes a light bulb to come on other than what I mention above.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andrew Williams
    WBA Consulting
    IT / Web / PCB / Audio
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-12-06 00:20
    What I did is pretty much double-up the circuit on the board. When I looked at the documentation, I thought the circuit of the the on-board sensor was the circuit for hooking it up to the the bs2px. Now, for all I know, I could have instead burned out a pin on my bs instead. I'll have to check.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
Sign In or Register to comment.