Shop OBEX P1 Docs P2 Docs Learn Events
Light Measurement - Page 2 — Parallax Forums

Light Measurement

2»

Comments

  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-11 13:52
    Wow a clue, Acording to your status bar the StampPlot it received an HISD or History enabled which was not part of the code you posted. Post your current code so I (or someone) can help you debug.

    Attached is the code posted which I·tested·- see if it works for you. If not than it may be a circuit design issue.

    Is this your circuit?· This is from the Whats a Microprocesor PDF.

    ·attachment.php?attachmentid=69338

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR

    Post Edited (TechnoRobbo) : 4/11/2010 2:08:04 PM GMT
    241 x 127 - 4K
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-11 15:25
    USMCinfinity said...
    Hi..this is how my graph looks like and the values are actually

    3
    3
    3
    3
    3
    3


    then it raises up to 40s when I block the light..
    40s????? is the "s" really there? That would confuse stampplot. The plot data should be just number strings. Such a low number too - you gotta post the circuit.

    BTW

    Assuming your using a BS2 and that your using the VT935G Photoresistor that Parralax sells,and given that a bright sunny day yields around 500 ohms and a covered photocell yields 46k, and your using a .01 microfarad cap.

    I would assume your just passing your hand over it. Those rctime reading - would be be plausible under those conditions.
    40/.01/635= 6.3k

    If your actually covering the cell and making it very dark then maybe your using a .001 microfarad cap.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR

    Post Edited (TechnoRobbo) : 4/11/2010 5:57:31 PM GMT
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-12 00:47
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    time VAR Word


    DEBUG "!PLOT ON",CR,
    "!AMAX 1250", CR,
    "!TMAX 25", CR,
    "!TMIN 0", CR,
    "!SHFT ON", CR,
    "!RSET",CR

    DO

    HIGH 2
    PAUSE 100
    RCTIME 2, 1, time
    DEBUG DEC time, CR

    LOOP



    That is my code...and no the "s" are not there..lol...can you post your code this way? or how do I take the code from your att..?

    And yes to the circuit design and capacitor value
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-12 00:50
    I tried your code and, it didn't work (for plotting)
  • FranklinFranklin Posts: 4,747
    edited 2010-04-12 01:31
    Two things to try.
    1. Send made up data to stamp plot like
    for i = 1 to 50
    debug DEC i
    next

    2. Remove, download (again) and reinstall stamp plot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-12 01:33
    Niether StampPlot Lite or Pro worked..so I'm guessing its something I have wrong..
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-12 11:07
    I also have 2 suggestions

    1. get rid of the plot commands your status line points to an error with a HISD command. Like this:
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    time VAR Word
    DO
    HIGH 2
    PAUSE 100
    RCTIME 2, 1, time
    DEBUG DEC time, CR 
    LOOP
    

    ·2. When you run this code you should see your data on the status line Here:

    ·attachment.php?attachmentid=69356


    This should happen whether it plots or not and will indicate if your comm is working.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR

    Post Edited (TechnoRobbo) : 4/12/2010 11:12:37 AM GMT
    524 x 137 - 60K
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-12 20:53
    I'm not at my house but do I use that code instead..?
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-12 22:37
    just to test the circuit operation, if it passes then add commands back in until the error appears again.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-13 01:34
    It works on the BS but still no plot...
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-13 02:54
    Does that mean you see the data on the status line of the StampPlot program? (Make sure the basic stamp editor is not running while testing - it may hog the comm port).·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-13 05:06
    What I posted here is what I see (on the screen shot)..and no,I make sure to close the blue screen before running the stampplot
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-13 11:14
    Just to be clear:
    using this code
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    time VAR Word
    DO
    HIGH 2
    PAUSE 100
    RCTIME 2, 1, time
    DEBUG DEC time, CR 
    LOOP 
    

    You see this HISD error

    attachment.php?attachmentid=69356

    on the stats line, while using the plt i posted?

    ·
    BTW Open that plt file by Double Clicking on it, not from the program.





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-13 20:31
    Yes, I see that line on the code you gave me..
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-14 00:43
    Have you tried pressing the rest on the BS while stamp plot is trying to plot? This can clear up an out of sync condition.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-14 00:55
    Yes I tried that..
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-14 18:35
    I'm a bit stumped because everything I do works on this side. Check what COM port stampplot is on then I would suggest trying Stephen's suggestion and uninstalling and installing Stamplot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
Sign In or Register to comment.