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.
Dependencies: mbed-dev mbed-rtos
Diff: Stoplicht.cpp
- Revision:
- 0:87617851c15a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Stoplicht.cpp Thu Jan 14 18:52:40 2016 +0000 @@ -0,0 +1,24 @@ +#include "Stoplicht.h" + +Stoplicht::Stoplicht(PinName rood, PinName groen){ + mGroen = new DigitalOut(groen); + mRood = new DigitalOut(rood); + *mGroen = true; + *mRood = true; +} + +void Stoplicht::set_Groen(){ + *mRood = true; + *mGroen = false; + mStoplichtRood = false; +} + +void Stoplicht::set_Rood(){ + *mGroen = true; + *mRood = false; + mStoplichtRood = true; +} + +bool Stoplicht::get_Status(){ + return mStoplichtRood; +}