Thanks a million!!
I used to post on a totally unrelated forum and it used to tell me if someone had replied to one of my posts/threads. My heart sank a bit because I thought I had, had no interest.
I know better now and have ticked that box.
Then
My........... what a reply guys (gals included)
You all amaze me......
I need to give you all some feedback my thanks is overflowing.
In short I got a worker.....
Phil I looked at your code first and thought to myself that's a flyer and so I gave it a try typed it in exact. Sure enough values appeared on the screen.
eclectic............thank you for pointing out my error about posting in the wrong area. Double thanks to BeanieBots
for puting my post in the right place...........I was in such a state over my little project I just wasn't thinking.
boriz.........I agree it all had to go in a loop but just one value at that point would have been heaven to me. So thanks. I don't know why but it's the top line that would prove to be the hardest and as it is was it wasn't going to work. I will explain later.
LizzieB....Thanks for the tip on windows versions....I went through hell with all of that when I was looking at the centronics port a few years ago. I got there in the end. So if anyone has woes. I read through a whole book and tried everything and only on the last page did it tell me I'd be wasting my time after windows 95/98.............got round it in VB6/XP back then.
This first toe in the water was with Windows 95 and Quickbasic 4.5 just to be safe. Windows 98 would give the same results I think for the centronics port.
"Liberty Basic" noted will try, thanks....
....but we are talking COM1 here so sorry to go all over the place.
Dr_Acula..........I'm hearing you.........MBASIC sounds interesting....
While I was down in the dumps I did try something in VB 2008 a free download and right up to date and what I wrote was simple but only runs for say a minute and then locks up. I will be sharing that prog with all later and maybe we all can get it to run perfect together.....cause that would be great.
Marcwolf.........I agree........I messed around in VB6 for a while and yes I have a copy around here and I may try something in that, but as you'll have just read..........VB2008 might just make it so easy it's unreal.....will post that code...later, but soon.
hippy.........Agreed I went through the same thought process as you and by now I've answered all those points you've raised..........which brings me right back in a circle to.........
Phil.........you are the main reason I've got a program up and running in Quickbasic. My main problem was opening the Comm port just right and this is where your code helped me so much. So I took that line and applied it to sort of my original way of doing things....more basic...and when I got a worker I pruned the top line down to the apsolute basics. So I've uploaded the dot bas file I made with quickbasic 4.5
I've also reproduced the bas file in text below.
CLS
OPEN "COM1:2400,N,8,1,CD0,DS0" FOR RANDOM AS #1
START : :
INPUT #1,R
LOCATE 15,40
PRINT R
IF INKEY$ = "" THEN GOTO START
CLOSE #1
Just a further note..... Phil when I ran your version I kept getting say 18,7,3,18,7,3,18,7,3 and over and over it would go not changing as I changed the input device which was an LDR. However with the prog above it runs sweet. I get 0-255 levels of light 250 infront of an open window 110 say in a lit room at night going all the way down to "0" with the lights out. It works well. Thank you very much for your help.
John