Re: Please help with basic math
Hi, That's not too difficult ... to use it with PBP
1) Pi (3.141592654 ...)
replace it by integer fraction like 22/7 or 355/113
2) here, angles are expressed in radians ... just change to BINARY radians PBP can deal with
2*pi rads = 360° = 255 binary radians ...
and keep a sharp eye on overflows ( depending on the processor used : 16F - 16 Bits unsigned, 18F with longs - 31 signed bits )
That's all !!!
looks it applies to a resistive load ( lamp, heather ...) but not to inductive loads ... like motors.
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks