Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ele350 by
sine_app.h@54:aee1b44e62ec, 2015-12-18 (annotated)
- Committer:
- GGHHHH
- Date:
- Fri Dec 18 16:27:23 2015 +0000
- Revision:
- 54:aee1b44e62ec
- Parent:
- 39:ab2557044815
h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
GGHHHH | 29:8ec9451b1a59 | 1 | #ifndef _SINE_APP_H_ |
GGHHHH | 29:8ec9451b1a59 | 2 | #define _SINE_APP_H_ |
GGHHHH | 29:8ec9451b1a59 | 3 | #include "app.h" |
GGHHHH | 29:8ec9451b1a59 | 4 | #include "mbed.h" |
GGHHHH | 29:8ec9451b1a59 | 5 | |
GGHHHH | 54:aee1b44e62ec | 6 | class SineApp : public App //Class containing the Sine app.// |
GGHHHH | 29:8ec9451b1a59 | 7 | { |
GGHHHH | 29:8ec9451b1a59 | 8 | protected: |
GGHHHH | 29:8ec9451b1a59 | 9 | AnalogOut* analogOut; |
GGHHHH | 29:8ec9451b1a59 | 10 | Timer timer; |
GGHHHH | 54:aee1b44e62ec | 11 | float amplitude; //Define the float amplitude value.// |
GGHHHH | 54:aee1b44e62ec | 12 | float frequence; //Define the float frequence value.// |
GGHHHH | 34:498a218cf53e | 13 | |
GGHHHH | 29:8ec9451b1a59 | 14 | public: |
GGHHHH | 54:aee1b44e62ec | 15 | SineApp(Serial* serialPort); //Constructor.// |
GGHHHH | 29:8ec9451b1a59 | 16 | |
GGHHHH | 54:aee1b44e62ec | 17 | virtual void start(); //(Overriden) called when app starts.// |
GGHHHH | 54:aee1b44e62ec | 18 | virtual void run(); //(Overriden) called repeatedly while running and do the sine expression.// |
GGHHHH | 54:aee1b44e62ec | 19 | virtual void stop(); //(Overriden) called when app stops.// |
GGHHHH | 54:aee1b44e62ec | 20 | void setamplitude (float newamplitude); //(Overriden) called when app starts, set the new amplitude.// |
GGHHHH | 54:aee1b44e62ec | 21 | void setfrequence (float newfrequence); //(Overriden) called when app starts, set the new frequence.// |
GGHHHH | 29:8ec9451b1a59 | 22 | }; |
GGHHHH | 29:8ec9451b1a59 | 23 | |
GGHHHH | 29:8ec9451b1a59 | 24 | #endif |