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
- 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
