JIAWEI ZHANG / Mbed 2 deprecated ele350ku

Dependencies:   mbed

Dependents:   Exercise8_1-2-3

Fork of ele350 by JIAWEI ZHANG

sine_app.h

Committer:
GGHHHH
Date:
2015-12-18
Revision:
54:aee1b44e62ec
Parent:
39:ab2557044815

File content as of revision 54:aee1b44e62ec:

#ifndef _SINE_APP_H_
#define _SINE_APP_H_
#include "app.h"
#include "mbed.h"

class SineApp : public App                                     //Class containing the Sine app.//
{
    protected:
       AnalogOut* analogOut;
       Timer timer;
       float amplitude;                                       //Define the float amplitude value.//
       float frequence;                                       //Define the float frequence value.//
       
    public:
       SineApp(Serial* serialPort);                           //Constructor.//
       
       virtual void start();                                  //(Overriden) called when app starts.//
       virtual void run();                                    //(Overriden) called repeatedly while running and do the sine expression.//
       virtual void stop();                                   //(Overriden) called when app stops.//
       void setamplitude (float newamplitude);                //(Overriden) called when app starts, set the new amplitude.//
       void setfrequence (float newfrequence);                //(Overriden) called when app starts, set the new frequence.//
};

#endif