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

Light Measurement

USMCinfinityUSMCinfinity Posts: 150
edited 2010-04-14 18:35 in BASIC Stamp
Hey guys I'm trying to measure light using the StampPlot Lite but when I try to connect the COM3 which is the one that the BS is one it says that that CON is unavailable...any help ?
«1

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-04-03 01:23
    You need to make sure nothing else is using the port.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-03 01:34
    Well, the BASIC Stamp is using the port, my BS is connected to COM3 and it says to connect the StampPlot to COM3, when I try to do so I get the message.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-04-03 02:10
    If you have DEBUG statements in your program, the debug window will open and block the port. If that's the case, you will need to either change your DEBUGs to SEROUT 16 ... or close the debug screen each time.

    -Phil
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-03 02:40
    Closing the DEBUG terminal is not working, I even deleted the DEBUG statement and the terminal would still show up...what is that about the SEROUT 16..

    this is my program

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    time VAR Word

    DEBUG "!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
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-03 23:40
    Please help?
  • FranklinFranklin Posts: 4,747
    edited 2010-04-04 00:14
    Since your program is running on the stamp try colsing the stamp editor completely and then pressing the reset button.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-04 00:26
    I don't even open the BS and its still not letting me..
  • silverbacksilverback Posts: 40
    edited 2010-04-04 18:41
    have you tried configuring stamp pro to other ports?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you convince yourself that something is impossible before you even try; you are sure to prove yourself right.
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-04 23:09
    Apparently the problem is with the stampPlot..whichever com I choose it says its unavailable..
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-06 03:06
    anyone?
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-06 03:37
    Ok I'll bite, Check your registry in this location:


    [noparse][[/noparse]HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{648A5600-2C6E-101B-82B6-000000000014}]

    it the "Compatibility Flags" = 00000400
    the set it to 0 and try the program again. if it works great if it doesn't set the registry back to hex 400.

    Why? If it works it's because StampPlot is using MSCOMM which is blocked by newer internet explorer.

    And why is it blocked - i believe some malware use activex components and this is MS's way to stop them.

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


    TR
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-06 06:32
    where would I changed the values it just says

    name value

    compatibility flags 1024

    when I try to modify it, it won't let me
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-06 16:30
    You should be able to double click on it and change it, You may not have administrator rights on that machine.

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


    TR
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-06 18:44
    Its not even letting me create, I'm the only account in this computer so..what the hell??
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-06 21:18
    wow some times malware locks you out so you can remove it. this is a quick fix if your locked out:

    Warning messing with registry can goof stuff up royally!
    Backup your registry first then

    Open Command Prompt.

    Type

    reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools

    Answer y.

    once you in check your run and run once registry keys under HKLM & HKLU to see if you are infected

    Run an antivirus

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


    TR

    Post Edited (TechnoRobbo) : 4/6/2010 9:24:33 PM GMT
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-06 21:38
    it says such registry key or value doesn't exists...
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-06 21:40
    but running bitdefender says I'm all clean..unless its one of those 200k+ skipped files..how can I do so it doesn't skip any ?
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-06 23:52
    Thank goodness for that!

    you can try this:

    Copy the code below into notepad save it as fix.reg then double click on the file - it should update your registry:

    Windows Registry Editor Version 5.00
    [noparse][[/noparse]HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{648A5600-2C6E-101B-82B6-000000000014}]
    "Compatibility Flags"=dword:0


    Hopefully StampPlot will work now, if not - To put your registry back do the same with this code:

    Windows Registry Editor Version 5.00
    [noparse][[/noparse]HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{648A5600-2C6E-101B-82B6-000000000014}]
    "Compatibility Flags"=dword:00000400



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


    TR
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-07 01:21
    Yup, it worked now..the StampPlot is ready the data..it displays 0's and g's when I put my hand over the photoresistor but I don't see any kind of plot in the graph....lol..any help with this?
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-07 02:18
    Unfortunately I know more about Comm than I do StampPlot - Now that we got it working, you need a StampPlot expert. I'm glad we got this far though. Good Luck.

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


    TR
  • FranklinFranklin Posts: 4,747
    edited 2010-04-07 04:07
    I'm not sure stamp plot can quantify 'g'

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-07 21:38
    Well, like when I run the program it doesn't read anything (since it is open to light) but when I cover it with my hand it starts showing like:

    g
    g
    g
    g
    0
    0
    0
    0
    0
    0
    g
    g
    g
    g
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-07 21:42
    but nothing shows in the graph..
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-08 01:13
    I'm not a StampPlot expert but don't you have to send a:
    DEBUG "!PLOT ON",CR
    to get it to go?

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


    TR
  • FranklinFranklin Posts: 4,747
    edited 2010-04-08 01:34
    You might try formatting your variable as byte.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-08 03:05
    Adding that DEBUG line didn't work..and how do I format my variables? (yes,I'm damn new with BASIC)
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-08 12:00
    Is the status bar at the bottom of StampPlot showing the right values?

    This may sound like a stupid question - but did you hit the "Connect" button and the "Start Plot" button?

    I tested the plot below with your output code and it worked

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


    TR

    Post Edited (TechnoRobbo) : 4/8/2010 9:40:22 PM GMT
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-09 01:49
    can you post a print screen?..yes I'm doing both those things..
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2010-04-09 11:56
    Ok the test is using your code from your post and my plt file.

    As you can see it works fine - is your wire connected to pin 2?


    attachment.php?attachmentid=692963

    Im also Assuming you are using a photoresistor with a .01 microfarad cap·in parallel

    post edited cause I had .001 instead of .01 and forgot the word "cap"

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


    TR

    Post Edited (TechnoRobbo) : 4/10/2010 4:49:41 PM GMT
    396 x 576 - 154K
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-04-11 04:58
    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..
    1366 x 768 - 148K
    LOG.png 147.9K
Sign In or Register to comment.