diff --git a/README.md b/README.md index 17af8de..d2deb06 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ The following links can be helpful for maintaining this code and understanding t ##### Transistor - https://www.elektronik-kompendium.de/sites/bau/0201291.htm - https://components101.com/transistors/s8050-transistor-pinout-equivalent-datasheet +- https://cdn-reichelt.de/documents/datenblatt/A100/PN2222A-FSC.pdf ##### IR-Reciever - https://www.elecrow.com/download/Infrared%20receiver%20vs1838b.pdf diff --git a/main/homepage_template.h b/main/homepage_template.h index 4c56c76..5b59944 100644 --- a/main/homepage_template.h +++ b/main/homepage_template.h @@ -1,63 +1,41 @@ String homepage_template(void){ -return -"" -"" - "" - "" - ""+String(titel)+"" - "" - "" - "" - "" - "" - "" - "" - "
" - "

"+String(titel)+"

" - "

An REST-API Arduino microcontroller, which allows you to interact with hardware and the physical environment.

" - "

Controller

" - "

Remote Plug Controller

" - "
" - "
" - "" - "" + String homepage = ""; + homepage = homepage + + "" + "" + "" + "" + ""+String(titel)+"" + "" + "" + "" + "" + "" + "" + "" + "
" + "

"+String(titel)+"

" + "

An REST-API Arduino microcontroller, which allows you to interact with hardware and the physical environment.

" + "

Controller

" + ""; + for(const char* parameter : parameter_list) + homepage = homepage + + "
" + "" + "" + "
"; + homepage = homepage + + "" + "" + "

Data

" + "
"
+           + getJson() +
+        "
" + "

The sensor datas in plane text can be reached here.

" + "
" + "

Please check out the git-repository to get more information about this software.

" "
" - "
" - "" - "" - "
" - "" - "" - "

Infared Controller

" - "
" - "
" - "" - "" - "
" - "
" - "" - "" - "
" - "
" - "" - "" - "
" - "" - "
" - "

Data

" - "
"
-         + getJson() +
-      "
" - "

The sensor datas in plane text can be reached here.

" - "
" - "

Please check out the git-repository to get more information about this software.

" - "
" - "" -""; + "" + ""; + return homepage; } diff --git a/main/main.ino b/main/main.ino index 0fe1b52..eeda5f7 100644 --- a/main/main.ino +++ b/main/main.ino @@ -35,6 +35,7 @@ const char* parameter_plug_status="plug_status"; const char* parameter_ir_type="ir_type"; const char* parameter_ir_data="ir_data"; const char* parameter_ir_bits="ir_bits"; +const char* parameter_list[]={parameter_plug_id,parameter_plug_status,parameter_ir_type,parameter_ir_data,parameter_ir_bits}; // Define variables decode_results results; @@ -125,7 +126,7 @@ void setRitterSwitch(int unit, int state) } void setIrColor(decode_type_t type,int data, int bits) { - // irsend.send(type, data, bits); + irsend.send(type, data, bits); Serial.print("The code \"" + String(data) + "\" with \"" + String(bits) + "\" was send in format \"" + getDecodeType(type) + "\"."); }