Mbed for ESIMEos / Mbed 2 deprecated TextLCD_HelloWorld

Dependencies:   mbed tsi_sensor TextLCD SLCD

Files at this revision

API Documentation at this revision

Comitter:
ArturoSoto
Date:
Thu May 02 18:31:31 2019 +0000
Parent:
2:ad0b044d0a10
Commit message:
LCD_De_Tarjeta

Changed in this revision

SLCD.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
tsi_sensor.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SLCD.lib	Thu May 02 18:31:31 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Sissors/code/SLCD/#ef2b3b7f1b01
--- a/main.cpp	Sat Dec 04 11:31:07 2010 +0000
+++ b/main.cpp	Thu May 02 18:31:31 2019 +0000
@@ -1,10 +1,26 @@
-// Hello World! for the TextLCD
+#include "mbed.h"
+#include "SLCD.h"
+#include "tsi_sensor.h"
+BusOut Salidas(PTE16, PTE17, PTE18, PTE19, PTE20, PTE21, PTE22, PTE23);
+uint8_t Segmentos[]={0x81, 0xE7, 0x49, 0x43, 0x27, 0x13, 0x11, 0xC7, 0x01, 0x03, 0x05, 0x31, 0x99, 0x61, 0x19, 0x1D, 0x91, 0x35, 0xBD, 0xB3, 0x2D, 0xB9, 0x85, 0x75, 0x71, 0x0D, 0x07, 0x3D, 0x13, 0x39, 0xF1, 0xE1, 0xA1, 0x25, 0x37, 0x49};
+SLCD slcd;                                                           
+TSIAnalogSlider slider(PTB16, PTB17, 100);      // touch sensor
 
-#include "mbed.h"
-#include "TextLCD.h"
+PwmOut gLed(LED_GREEN);                             // pwm out
+PwmOut rLed(LED_RED);
 
-TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7
+int main()  
+{ 
+    slcd.printf("lcd ");
+    wait(2);                                                                   // delay 2 sec
 
-int main() {
-    lcd.printf("Hello World!\n");
-}
+    while (1) 
+    { 
+            slcd.CharPosition = 0;          
+            //Salidas=Segmentos[];                          // if we don't use it the value on the screen will be sliding
+            slcd.printf("%1.3f",slider.readPercentage()); // print TSI_sensor value on LCD
+            rLed = slider.readPercentage();                     // set TSI_value to the PWM linked with LED
+            gLed = 1.0 - slider.readPercentage();
+            wait_ms(10); 
+    }
+}
\ No newline at end of file
--- a/mbed.bld	Sat Dec 04 11:31:07 2010 +0000
+++ b/mbed.bld	Thu May 02 18:31:31 2019 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsi_sensor.lib	Thu May 02 18:31:31 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Kojto/code/tsi_sensor/#976904559b5c