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.
Revision 0:d224dddbdff6, committed 2020-11-19
- Comitter:
- sbartulov
- Date:
- Thu Nov 19 15:25:21 2020 +0000
- Commit message:
- Moj prvi Library, primjer titranja LEDice
Changed in this revision
| titranje.cpp | Show annotated file Show diff for this revision Revisions of this file |
| titranje.h | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/titranje.cpp Thu Nov 19 15:25:21 2020 +0000
@@ -0,0 +1,10 @@
+#include "titranje.h"
+#include "mbed.h"
+
+titranje::titranje(PinName pin):ledica(pin) {
+ledica=1;
+}
+void titranje::stanje_ok() {
+ledica=!ledica;
+wait(0.2);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/titranje.h Thu Nov 19 15:25:21 2020 +0000
@@ -0,0 +1,14 @@
+#ifndef TREPTAC_H
+#define TREPTAC_H
+
+#include "mbed.h"
+
+class titranje {
+public:
+titranje(PinName pin);
+void stanje_ok();
+
+private:
+DigitalOut ledica;
+};
+#endif
\ No newline at end of file