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:10f03925f32f, committed 2015-06-18
- Comitter:
- sgrsn
- Date:
- Thu Jun 18 08:05:03 2015 +0000
- Commit message:
- pikachu!!pikapikka!!!pi-ka-chu---------!!!!!!
Changed in this revision
| pikachu.cpp | Show annotated file Show diff for this revision Revisions of this file | 
| pikachu.h | Show annotated file Show diff for this revision Revisions of this file | 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pikachu.cpp	Thu Jun 18 08:05:03 2015 +0000
@@ -0,0 +1,14 @@
+#include "pikachu.h"
+#include "mbed.h"
+
+    pikachu::pikachu(PinName p) : _pin(p) {
+        _pin = 0;
+    }
+    
+     void pikachu::flash(int n) {
+        for(int i=0; i<n*2; i++) {
+            _pin = !_pin;
+            wait(0.1);
+        }
+    }
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pikachu.h	Thu Jun 18 08:05:03 2015 +0000
@@ -0,0 +1,16 @@
+#ifndef MBED_pikachu_H
+#define MBED_pikachu_H
+
+#include "mbed.h"
+
+class pikachu {
+private:
+    DigitalOut _pin;
+public:
+    pikachu(PinName p);
+    
+    void flash(int n);
+};
+
+#endif
+