to verify the position of the LEDs
This is an attempt to address all the 25 LEDs. This has been done but only on rows. I need to arrange the column calls in some form of array which can be indexed.
Revision 9:bf2d151b3b6e, committed 2020-10-19
- Comitter:
- matrixmike
- Date:
- Mon Oct 19 00:17:33 2020 +0000
- Parent:
- 8:7a49220aaa22
- Commit message:
- experimenting with easy classes and objects prior to implementing useful code
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Oct 22 11:25:52 2019 +0000 +++ b/main.cpp Mon Oct 19 00:17:33 2020 +0000 @@ -32,6 +32,22 @@ DigitalOut row3(P0_15); // something typedef int (*IntFunctionWithOneParameter) (int a); +class Employee { + private: + // Private attribute + int salary; + + public: + // Setter + void setSalary(int s) { + salary = s; + } + // Getter + int getSalary() { + return salary; + } +}; + int function(int a) { return a; @@ -51,10 +67,15 @@ function, functionTimesTwo, functionDivideByTwo, + function // row1 // row1(P0_13) row1(P0_13) }; + Employee myObj; + myObj.setSalary(50000); +int newSal = myObj.getSalary(); + for(int i = 0; i < 3; ++i) { // cout << functions[i](8) << endl; functions[i](8);