Conversions for the LCD display in FRDM-KL46Z
Dependents: eem202a_display eem202a_resolutedreamer_1
convert.h
- Committer:
- Waldek
- Date:
- 2014-04-19
- Revision:
- 0:ca69bce3284f
- Child:
- 1:cf83568dc17a
File content as of revision 0:ca69bce3284f:
#pragma once #include "SLCD.h" /* ------ sample usage------ while (true) { wait(1.); slcd.display(99999); // OFL wait(2.); slcd.display(9999); // 9999 wait(1.); slcd.display(-999); // -999 wait(1.); slcd.display(-99999); // -OFL wait(2.); slcd.display(99999.0); // OFL wait(1.); slcd.display(1000.0); // 1000 wait(1.); slcd.display(200.0); // 200.0 wait(1.); slcd.display(30.0); // 30.00 wait(1.); slcd.display(4.0); // 4.000 wait(1.); slcd.display((float)0.5); // 0.500 wait(1.); slcd.display((double)0.0); // 0 wait(1.); slcd.display((float)-0.6); // -0.60 wait(1.); slcd.display((double)-7.0); // -7.00 wait(1.); slcd.display((float)-80.0); // -80.0 wait(1.); slcd.display((double)-900.0); // -900 wait(1.); slcd.display(-12345.0); // -OFL wait(1.); } */ class convert : public SLCD { public: convert(); bool display(unsigned int number); bool display(int number); bool display(float number); bool display(double number); private: bool display_digits(unsigned int number, bool negate=false); void prepare(void); };