Shop OBEX P1 Docs P2 Docs Learn Events
Understanding Signals — Parallax Forums

Understanding Signals

Richard McCallRichard McCall Posts: 6
edited 2007-04-11 02:42 in BASIC Stamp
On p. 62 of the Understanding Signals manual the following directive is given: "Calculate the resistance of the photoresistor with the following formula." There follows a table of variables with the constant "e", but no fomula is given using that constant.

The next paragraph presents a seemingly alternative formula using the natural logarithm. I have attempted to apply this repeatedly using the RCTimeConstantWth Photoresistot.bs2 program and the Optiscope. The time readings are similar bewteen the program and the oscilloscope. However, they in no way match the equation when I solve for time.

I have used the section in the programming manual on RCTime with some success, but none of these formulae use "e" in their equations either.

Is there a missing formula on·page 62?

Thanks,

Rick McCall

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-11 02:42
    Exp(x) is a transcendental function whose value is e to the x power and is the inverse of the natural logarithm. The constant "e" whose value is approximately 2.71828183 is the value of Exp(1). The Stamps use 16-bit integer arithmetic and neither function is useful that way. Tracy Allan's website has lots of useful information on Stamp use including math and he has routines for approximating Exp(x) and Ln(x) (see: www.emesystems.com).
Sign In or Register to comment.