PDA

View Full Version : Light Measurement



USMCinfinity
04-03-2010, 05:30 AM
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 ?

Franklin
04-03-2010, 09:23 AM
You need to make sure nothing else is using the port.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

USMCinfinity
04-03-2010, 09:34 AM
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)
04-03-2010, 10:10 AM
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

USMCinfinity
04-03-2010, 10:40 AM
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

USMCinfinity
04-04-2010, 07:40 AM
Please help?

Franklin
04-04-2010, 08:14 AM
Since your program is running on the stamp try colsing the stamp editor completely and then pressing the reset button.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

USMCinfinity
04-04-2010, 08:26 AM
I don't even open the BS and its still not letting me..

silverback
04-05-2010, 02:41 AM
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.

USMCinfinity
04-05-2010, 07:09 AM
Apparently the problem is with the stampPlot..whichever com I choose it says its unavailable..

USMCinfinity
04-06-2010, 11:06 AM
anyone?

TechnoRobbo
04-06-2010, 11:37 AM
Ok I'll bite, Check your registry in this location:


[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

USMCinfinity
04-06-2010, 02:32 PM
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

TechnoRobbo
04-07-2010, 12:30 AM
You should be able to double click on it and change it, You may not have administrator rights on that machine.

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


TR

USMCinfinity
04-07-2010, 02:44 AM
Its not even letting me create, I'm the only account in this computer so..what the hell??

TechnoRobbo
04-07-2010, 05:18 AM
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\Pol icies\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

USMCinfinity
04-07-2010, 05:38 AM
it says such registry key or value doesn't exists...

USMCinfinity
04-07-2010, 05:40 AM
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 ?

TechnoRobbo
04-07-2010, 07:52 AM
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
[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
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{648A5600-2C6E-101B-82B6-000000000014}]
"Compatibility Flags"=dword:00000400


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


TR

USMCinfinity
04-07-2010, 09:21 AM
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?

TechnoRobbo
04-07-2010, 10:18 AM
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

Franklin
04-07-2010, 12:07 PM
I'm not sure stamp plot can quantify 'g'

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

USMCinfinity
04-08-2010, 05:38 AM
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

USMCinfinity
04-08-2010, 05:42 AM
but nothing shows in the graph..

TechnoRobbo
04-08-2010, 09:13 AM
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

Franklin
04-08-2010, 09:34 AM
You might try formatting your variable as byte.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

USMCinfinity
04-08-2010, 11:05 AM
Adding that DEBUG line didn't work..and how do I format my variables? (yes,I'm damn new with BASIC)

TechnoRobbo
04-08-2010, 08:00 PM
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

USMCinfinity
04-09-2010, 09:49 AM
can you post a print screen?..yes I'm doing both those things..

TechnoRobbo
04-09-2010, 07:56 PM
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?


http://forums.parallax.com/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

USMCinfinity
04-11-2010, 12:58 PM
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..

TechnoRobbo
04-11-2010, 09:52 PM
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.

·http://forums.parallax.com/attachment.php?attachmentid=69338

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


TR

Post Edited (TechnoRobbo) : 4/11/2010 2:08:04 PM GMT

TechnoRobbo
04-11-2010, 11:25 PM
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

USMCinfinity
04-12-2010, 08:47 AM
' {$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

USMCinfinity
04-12-2010, 08:50 AM
I tried your code and, it didn't work (for plotting)

Franklin
04-12-2010, 09:31 AM
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

USMCinfinity
04-12-2010, 09:33 AM
Niether StampPlot Lite or Pro worked..so I'm guessing its something I have wrong..

TechnoRobbo
04-12-2010, 07:07 PM
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:

·http://forums.parallax.com/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

USMCinfinity
04-13-2010, 04:53 AM
I'm not at my house but do I use that code instead..?

TechnoRobbo
04-13-2010, 06:37 AM
just to test the circuit operation, if it passes then add commands back in until the error appears again.

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


TR

USMCinfinity
04-13-2010, 09:34 AM
It works on the BS but still no plot...

TechnoRobbo
04-13-2010, 10:54 AM
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

USMCinfinity
04-13-2010, 01:06 PM
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

TechnoRobbo
04-13-2010, 07:14 PM
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

http://forums.parallax.com/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

USMCinfinity
04-14-2010, 04:31 AM
Yes, I see that line on the code you gave me..

TechnoRobbo
04-14-2010, 08:43 AM
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

USMCinfinity
04-14-2010, 08:55 AM
Yes I tried that..

TechnoRobbo
04-15-2010, 02:35 AM
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