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:978160d93f83, committed 2015-08-05
- Comitter:
- Jamess
- Date:
- Wed Aug 05 13:41:30 2015 +0000
- Commit message:
- Criando array de classes;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Signal.cpp Wed Aug 05 13:41:30 2015 +0000
@@ -0,0 +1,13 @@
+#include "Signal.h"
+
+uint32_t Signal::getValue(void){
+
+ return Value;
+
+ }
+
+void Signal::setValue(uint32_t a){
+
+ Value = a;
+
+ }
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Signal.h Wed Aug 05 13:41:30 2015 +0000
@@ -0,0 +1,15 @@
+#ifndef SIGNAL_H
+#define SIGNAL_H
+
+#include"mbed.h"
+
+class Signal{
+
+ private:
+ uint32_t Value;
+ public:
+ void setValue(uint32_t);
+ uint32_t getValue(void);
+};
+
+#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Aug 05 13:41:30 2015 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "Signal.h"
+
+Serial pc(USBTX,USBRX);
+
+int main() {
+
+ Signal Acc[10];
+
+ for(int x=0;x<10;x++){
+
+ Acc[x].setValue(x);
+
+ }
+
+ for(int y=0;y<10;y++){
+
+ pc.printf("%i",Acc[y].getValue());
+
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Aug 05 13:41:30 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/bad568076d81 \ No newline at end of file