Simply creates a servo object from a motor object, to allow the control of the angle. uses the solar panel to look for the brightest spot, then stops.

Dependencies:   mbed

Fork of Lab6_Basic by ECE 111 At Oregon State University

Committer:
dogcatfee
Date:
Tue Nov 14 13:02:54 2017 -0800
Revision:
6:65dfd3886629
Update for KL43Z

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dogcatfee 6:65dfd3886629 1 /*^^^^^^^^^^^^^^^^ LCD HARDWARE CONECTION ^^^^^^^^^^^^^^^^^^^^^^^^*/
dogcatfee 6:65dfd3886629 2 #define _LCDFRONTPLANES (8) // # of frontPlanes
dogcatfee 6:65dfd3886629 3 #define _LCDBACKPLANES (4) // # of backplanes
dogcatfee 6:65dfd3886629 4
dogcatfee 6:65dfd3886629 5 /*
dogcatfee 6:65dfd3886629 6 LCD logical organization definition
dogcatfee 6:65dfd3886629 7 This section indicates how the LCD is distributed how many characteres of (7-seg, 14,seg, 16 seg, or colums in case of Dot Matrix) does it contain
dogcatfee 6:65dfd3886629 8 First character is forced only one can be written
dogcatfee 6:65dfd3886629 9
dogcatfee 6:65dfd3886629 10 */
dogcatfee 6:65dfd3886629 11 // HARDWARE_CONFIG Changing LCD pins Allows to verify all LCD pins easily
dogcatfee 6:65dfd3886629 12 // if HARDWARE_CONFIG == 0 FRDM-KL46 RevB
dogcatfee 6:65dfd3886629 13 // if HARDWARE_CONFIG == 1 FRDM-KL46 RevA
dogcatfee 6:65dfd3886629 14 //#ifdef FRDM_REVA
dogcatfee 6:65dfd3886629 15 //#define HARDWARE_CONFIG 1
dogcatfee 6:65dfd3886629 16 //#else
dogcatfee 6:65dfd3886629 17 #define HARDWARE_CONFIG 0
dogcatfee 6:65dfd3886629 18 //#endif
dogcatfee 6:65dfd3886629 19
dogcatfee 6:65dfd3886629 20 #define _CHARNUM (4) //number of chars that can be written
dogcatfee 6:65dfd3886629 21 #define _CHAR_SIZE (2) // Used only when Dot Matrix is used
dogcatfee 6:65dfd3886629 22 #define _LCDTYPE (2) //indicate how many LCD_WF are required to write a single Character
dogcatfee 6:65dfd3886629 23
dogcatfee 6:65dfd3886629 24 /*
dogcatfee 6:65dfd3886629 25 Following definitions indicate how characters are associated to waveform
dogcatfee 6:65dfd3886629 26 */
dogcatfee 6:65dfd3886629 27 /* Hardware configuration */
dogcatfee 6:65dfd3886629 28 #if HARDWARE_CONFIG == 0
dogcatfee 6:65dfd3886629 29
dogcatfee 6:65dfd3886629 30 // LCD PIN1 to LCDWF2 for FRDM-KL43Z
dogcatfee 6:65dfd3886629 31 #define CHAR1a 20 // LCD Pin 5
dogcatfee 6:65dfd3886629 32 #define CHAR1b 24 // LCD Pin 6
dogcatfee 6:65dfd3886629 33 #define CHAR2a 26 // LCD Pin 7
dogcatfee 6:65dfd3886629 34 #define CHAR2b 27 // LCD Pin 8
dogcatfee 6:65dfd3886629 35 #define CHAR3a 40 // LCD Pin 9
dogcatfee 6:65dfd3886629 36 #define CHAR3b 42 // LCD Pin 10
dogcatfee 6:65dfd3886629 37 #define CHAR4a 43 // LCD Pin 11
dogcatfee 6:65dfd3886629 38 #define CHAR4b 44 // LCD Pin 12
dogcatfee 6:65dfd3886629 39 #define CHARCOM0 59 // LCD Pin 1
dogcatfee 6:65dfd3886629 40 #define CHARCOM1 60 // LCD Pin 2
dogcatfee 6:65dfd3886629 41 #define CHARCOM2 14 // LCD Pin 3
dogcatfee 6:65dfd3886629 42 #define CHARCOM3 15 // LCD Pin 4
dogcatfee 6:65dfd3886629 43
dogcatfee 6:65dfd3886629 44 // LCD PIN1 to LCDWF2 for FRDM-KL46Z
dogcatfee 6:65dfd3886629 45 #elif HARDWARE_CONFIG == 1
dogcatfee 6:65dfd3886629 46 #define CHAR1a 37 // LCD Pin 5
dogcatfee 6:65dfd3886629 47 #define CHAR1b 17 // LCD Pin 6
dogcatfee 6:65dfd3886629 48 #define CHAR2a 7 // LCD Pin 7
dogcatfee 6:65dfd3886629 49 #define CHAR2b 8 // LCD Pin 8
dogcatfee 6:65dfd3886629 50 #define CHAR3a 12 // LCD Pin 9
dogcatfee 6:65dfd3886629 51 #define CHAR3b 26 // LCD Pin 10
dogcatfee 6:65dfd3886629 52 #define CHAR4a 10 // LCD Pin 11
dogcatfee 6:65dfd3886629 53 #define CHAR4b 11 // LCD Pin 12
dogcatfee 6:65dfd3886629 54 #define CHARCOM0 51 // LCD Pin 1
dogcatfee 6:65dfd3886629 55 #define CHARCOM1 52 // LCD Pin 2
dogcatfee 6:65dfd3886629 56 #define CHARCOM2 19 // LCD Pin 3
dogcatfee 6:65dfd3886629 57 #define CHARCOM3 16 // LCD Pin 4
dogcatfee 6:65dfd3886629 58
dogcatfee 6:65dfd3886629 59 #endif
dogcatfee 6:65dfd3886629 60
dogcatfee 6:65dfd3886629 61
dogcatfee 6:65dfd3886629 62 /*Ascii Codification table information */
dogcatfee 6:65dfd3886629 63 #define ASCCI_TABLE_START '0' // indicates which is the first Ascii character in the table
dogcatfee 6:65dfd3886629 64 #define ASCCI_TABLE_END 'Z' // indicates which is the first Ascii character in the table
dogcatfee 6:65dfd3886629 65 #define BLANK_CHARACTER '>' // Indicate which ASCII character is a blank character (depends on ASCII table)
dogcatfee 6:65dfd3886629 66
dogcatfee 6:65dfd3886629 67 #define _ALLON 0xFF // Used for ALL_on function
dogcatfee 6:65dfd3886629 68
dogcatfee 6:65dfd3886629 69 #define SEGDP 0x01
dogcatfee 6:65dfd3886629 70 #define SEGC 0x02
dogcatfee 6:65dfd3886629 71 #define SEGB 0x04
dogcatfee 6:65dfd3886629 72 #define SEGA 0x08
dogcatfee 6:65dfd3886629 73
dogcatfee 6:65dfd3886629 74 #define SEGD 0x01
dogcatfee 6:65dfd3886629 75 #define SEGE 0x02
dogcatfee 6:65dfd3886629 76 #define SEGG 0x04
dogcatfee 6:65dfd3886629 77 #define SEGF 0x08
dogcatfee 6:65dfd3886629 78
dogcatfee 6:65dfd3886629 79
dogcatfee 6:65dfd3886629 80 /* Fault detect initial limits */
dogcatfee 6:65dfd3886629 81
dogcatfee 6:65dfd3886629 82 /* Fault detect initial parameters and limits */
dogcatfee 6:65dfd3886629 83 #define FAULTD_FP_FDPRS FDPRS_32
dogcatfee 6:65dfd3886629 84 #define FAULTD_FP_FDSWW FDSWW_128
dogcatfee 6:65dfd3886629 85 #define FAULTD_BP_FDPRS FDPRS_64
dogcatfee 6:65dfd3886629 86 #define FAULTD_BP_FDSWW FDSWW_128
dogcatfee 6:65dfd3886629 87
dogcatfee 6:65dfd3886629 88 #define FAULTD_FP_HI 127
dogcatfee 6:65dfd3886629 89 #define FAULTD_FP_LO 110
dogcatfee 6:65dfd3886629 90 #define FAULTD_BP_HI 127
dogcatfee 6:65dfd3886629 91 #define FAULTD_BP_LO 110
dogcatfee 6:65dfd3886629 92 #define FAULTD_TIME 6
dogcatfee 6:65dfd3886629 93
dogcatfee 6:65dfd3886629 94 extern const uint8_t WF_ORDERING_TABLE[]; // Logical Front plane N to LCD_WFx
dogcatfee 6:65dfd3886629 95
dogcatfee 6:65dfd3886629 96