[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: read temperature from i/o port
In article <4hj6gh$7iq@acme.freenet.columbus.oh.us>
dalloff@freenet.columbus.oh.us (Dave Althoff) writes:
> Jason Jeffries (jxj119@email.psu.edu) wrote:
> : The paddle port can be read with the PDL command.
>
> : let x = PDL (0)
>
> : would read paddle 0.
>
> (everything else snipped)
> First of all, I would suggest using PDL(2) for the sensor, now that I
> think about it, so that it won't interfere with your paddles or joystick
> (if applicable).
I guess I should add that there must be a delay between paddle reads. A
little for-next do nothing loop will suffice. Reading any of the
paddles causes them all to "act up", and any reads from any of them
before they've "settled down" again will not be accurate. There's no
real reason to read a paddle very often for the temperature anyway, but
I thought I should mention it.
> What got my attention was Jason's programming fragment (quoted above). I
> think that's the first time I've seen the BASIC keyword "LET" used
> intentionally in about fifteen years. It's absolutely correct, perfectly
> accurate, and according to the people who teach BASIC programming, YOU ARE
> SUPPOSED TO USE IT. Never mind that most of us undisciplined Applesoft
> louts write spaghetti code, jump out of unfinished FOR loops with reckless
> abandon, actually use the GOTO statement, and forgot about both REM and
> LET years ago. 8-)
>
> It's nice to see that someone still remembers.
tee hee hee... I haven't used Applesoft in years, and the closest thing
to BASIC I've done since was in my METAL BBS days, around 2 years ago.
In reality, though, I'd very likely skip the "let" unless someone that
knew better was looking over my shoulder, or the program was destined
to be seen by other people. I like to make it seem like I know what I'm
doing. ;)
---
I just make the bomb, I don't drop it.