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:07:24 2017 -0800
Revision:
8:0d8f931d6f8c
Parent:
6:65dfd3886629
Remove SLCD.lib, hg remove SLCD.lib

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dogcatfee 6:65dfd3886629 1 #include "mbed.h"
dogcatfee 6:65dfd3886629 2
dogcatfee 6:65dfd3886629 3
dogcatfee 6:65dfd3886629 4 /* ------ sample usage------
dogcatfee 6:65dfd3886629 5
dogcatfee 6:65dfd3886629 6 #include "mbed.h"
dogcatfee 6:65dfd3886629 7 #include "SLCD.h"
dogcatfee 6:65dfd3886629 8
dogcatfee 6:65dfd3886629 9 SLCD slcd;
dogcatfee 6:65dfd3886629 10
dogcatfee 6:65dfd3886629 11 main()
dogcatfee 6:65dfd3886629 12 {
dogcatfee 6:65dfd3886629 13 slcd.printf("1234"); // standard printf function, only charaters in ASCII_TO_WF_CODIFICATION_TABLE will display
dogcatfee 6:65dfd3886629 14 slcd.putc("A"); // prints a single character
dogcatfee 6:65dfd3886629 15 slcd.Write_Char('A'); // prints a single character
dogcatfee 6:65dfd3886629 16 slcd.All_Segments(y); // y=1 for ALL segments on, 0 for ALL segments off
dogcatfee 6:65dfd3886629 17 slcd.DPx(y); // x=DP1 to DP3, y=1 for on 0 for off
dogcatfee 6:65dfd3886629 18 slcd.Colon(y); // y=1 for on, 0 for off
dogcatfee 6:65dfd3886629 19 slcd.CharPosition=x; // x=0 to 3, 0 is start position
dogcatfee 6:65dfd3886629 20 slcd.Home(); // sets next charater to posistion 0 (start)
dogcatfee 6:65dfd3886629 21 slcd.Contrast (x); // set contrast x=0 - 15, 0 lightest, 15 darkest
dogcatfee 6:65dfd3886629 22 }
dogcatfee 6:65dfd3886629 23 */
dogcatfee 6:65dfd3886629 24
dogcatfee 6:65dfd3886629 25 class SLCD : public Stream {
dogcatfee 6:65dfd3886629 26 public:
dogcatfee 6:65dfd3886629 27 SLCD();
dogcatfee 6:65dfd3886629 28
dogcatfee 6:65dfd3886629 29 void init();
dogcatfee 6:65dfd3886629 30 void Write_Char(char lbValue);
dogcatfee 6:65dfd3886629 31 void Home (void);
dogcatfee 6:65dfd3886629 32 void Contrast (uint8_t lbContrast);
dogcatfee 6:65dfd3886629 33 void All_Segments (int);
dogcatfee 6:65dfd3886629 34 void DP1 (int);
dogcatfee 6:65dfd3886629 35 void DP2 (int);
dogcatfee 6:65dfd3886629 36 void DP3 (int);
dogcatfee 6:65dfd3886629 37 void Colon (int);
dogcatfee 6:65dfd3886629 38 uint8_t CharPosition;
dogcatfee 6:65dfd3886629 39 void clear();
dogcatfee 6:65dfd3886629 40
dogcatfee 6:65dfd3886629 41 virtual int _putc(int c);
dogcatfee 6:65dfd3886629 42 virtual int _getc() {
dogcatfee 6:65dfd3886629 43 return 0;
dogcatfee 6:65dfd3886629 44 }
dogcatfee 6:65dfd3886629 45 };