mjghjglhkg

Dependencies:   mbed TextLCD max6675 DHT11

Files at this revision

API Documentation at this revision

Comitter:
juanespitiarobotica
Date:
Sun Feb 27 23:35:00 2022 +0000
Commit message:
jklhjvhj

Changed in this revision

DHT11.lib Show annotated file Show diff for this revision Revisions of this file
TextLCD.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
max6675.lib 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DHT11.lib	Sun Feb 27 23:35:00 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/s_inoue_mbed/code/DHT11/#e91c151d1798
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Sun Feb 27 23:35:00 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/juanespitiarobotica/code/TextLCD/#95892122f5d0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Feb 27 23:35:00 2022 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+#include "max6675.h"
+#include "TextLCD.h"
+#include "DHT11.h"
+
+max6675 tem(D12,D13,D11);
+I2C i2c_lcd(D5,D7);
+DigitalOut led(LED2), v1(D9), v2(D2), v3(D8);
+TextLCD_I2C lcd(&i2c_lcd, 0x4E,  TextLCD::LCD16x2, TextLCD::HD44780);
+AnalogIn poten(A5);
+DHT11 med(D6);
+InterruptIn bot(A0);
+Serial pc(USBTX,USBRX);
+
+void potenenv(){
+    float pot=poten.read_u16();
+    printf("poten: %1.2f\n",pot);
+    wait(1);
+    }
+
+int main()
+{
+    lcd.setMode(TextLCD::DispOn);
+    lcd.setBacklight(TextLCD::LightOn);
+    lcd.setCursor(TextLCD::CurOff_BlkOff);
+    bot.rise(&potenenv);
+    while (true) {
+      if(pc.getc()=='p'){
+               v1=!v1;
+               wait(1);
+      }else if(pc.getc()=='h'){
+               v2=!v2;
+               wait(1);
+      }else if(pc.getc()=='t'){
+               v3=!v3;
+               wait(1);
+          }else{
+                v1=0;
+                v2=0;
+                v3=0;
+                }
+            }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/max6675.lib	Sun Feb 27 23:35:00 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/juanespitiarobotica/code/max6675/#74731b8476a0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Feb 27 23:35:00 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file