——Site na ọgbakọ Mmepụta DWIN
N'ime mbipụta a, anyị ga-ewebata gị ihe nrịbama mepere emepe nke Devin Developer Forum maka itinye ihuenyo Divin n'ọhịa ọhụrụ - webpage nchọgharị na T5L Divin Screen serial port in-depth expansion (teknụzụ Node-RED) . Ndị injinia na-eji T5L smart screens ịgafe teknụzụ Node-RED chọrọ naanị ọdụ ụgbọ mmiri iji jikọọ na ịntanetị wee ghọta mmekọrịta data n'etiti ihuenyo Diwen na ibe weebụ ihe nchọgharị. Ngwọta a na-achọpụta ọrụ dị ka izipu na ịnata data, mmekọrịta eserese, na ngosipụta ozi bụ isi n'etiti ihuenyo smart na ibe weebụ.
1. Node-RED ibe weebụ na-agba ọsọ ngosi ngosi
(1) N'iji teknụzụ Node-RED, a na-eji ihe nchọgharị ahụ dị ka ọnụ ụzọ mmekọrịta, nke mere na ihe nchọgharị na ihuenyo na-emekọrịta site na ọdụ ụgbọ mmiri iji ghọta ihe ngosi ọrụ kwekọrọ.
![agba (1)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96baa7b18a54530.jpg)
![agba (2)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96babae2d997861.jpg)
Nzipu na ịnata ibe Tab
Akara ibe Tab mmekọrịta
![agba (3)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96bad3193a85099.jpg)
Mmetụta ibe Tab ozi bụ isi
(2) Koodu ntụaka bụ isi maka onye ahịa webụ Node-RED bụ ndị a:
{
"id": "fbb314a16ea00889",
"ụdị": "Oghere Usoro n'ime",
"si": "09e0777eaff7fdea",
"g": "c1661722c7db00f9",
"name": "Ọdụ ụgbọ mmiri na-enweta data",
"Oghere Usoro": "83fb45b5f4b51d61",
"x": 390,
"na": 140,
"waya": [
[
"685a2fb2c2dc8fba"
]
]
},
{
"id": "1ba3c6e812e03e27",
"ụdị": "serial out",
"si": "09e0777eaff7fdea",
"g": "c1661722c7db00f9",
"name": "Nzipu ọdụ ụgbọ mmiri",
"Oghere Usoro": "83fb45b5f4b51d61",
"x": 860,
"na": 260,
" waya": []
},
{
"id": "5fb7f1d3d7425133",
"ụdị": "ọnọdụ",
"si": "09e0777eaff7fdea",
"g": "c1661722c7db00f9",
"name": "Lelee ọkwa ọdụ ụgbọ mmiri",
"okirikiri": [
"fbb314a16ea00889"
],
"x": 390,
"na": 200,
"waya": [
[
"3f18d1fdea398d35"
]
]
},
{
"id": "3f18d1fdea398d35",
"ụdị": "ọrụ",
"si": "09e0777eaff7fdea",
"g": "c1661722c7db00f9",
"name": "Wepụta ọkwa ọdụ ụgbọ mmiri",
"func": "let sta = msg.status.text;\nlet color = 'red';\nif (sta.indexOf('not-connected') >= 0) \n sta = 'Enweghi njikọ';\nse ọ bụrụ (sta.indexOf('connected') >= 0)\n{\n sta = 'njikọ gara nke ọma';\n color = 'green';\n}else\n sta = 'njehie mere';\nmsg[' akwụ ụgwọ'] = sta;\nmsg['agba'] = agba;\n\n weghachite msg;",
"mpụta": 1,
"Oge oge": 0,
"noer": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 620,
"na": 200,
"waya": [
[
"2ec78ff0b0b9a56f"
]
]
},
{
"id": "2ec78ff0b0b9a56f",
"ụdị": "ui_template",
"si": "09e0777eaff7fdea",
"g": "c1661722c7db00f9",
"otu": "4e4db779a7b91019",
"name": "Gosipụta ọkwa ọdụ ụgbọ mmiri",
"usoro": 1,
"obosara": 0,
"ịdị elu": 0,
"usoro":"
2. DGUSIinterfaceDchepụta
![agba (4)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96bae62cee44597.jpg)
1. C51 Engineering Design
Ihe ngwọta na-eji T5L smart screen serial port 2 iji kparịta ibe weebụ Node-RED. Ụfọdụ koodu ntụaka bụ ndị a:
#gụnye "sys.h"
#gụnyere "uart2.h"
#gụnye
#gụnye
u8 akpa[200];
isi ihe efu (void)
{
iri na isii;
afọ 16;
afọ 16;
u8i;
sys_init ();
uart2_init (115200);
ochie= 0;
mgbe (1)
{
ọ bụrụ na (bụ_recv_zuru ezu)
{
uart2_buf[recv_len++]= 0;
uart2_buf[recv_len++]= 0;
ọ bụrụ (strstr ((char*) uart2_buf,"cmd"))
{
ọnụọgụ = uart2_buf[3] -'0';
ọ bụrụ (nọmba
{
maka (i=0; i
{
val= (nọmba==i);
sys_write_vp (0x2300+i, (u8*)&val, 1);
}
} ọzọ (nọmba
{
val=(ọnụọgụ==3);
sys_write_vp (0x2200, (u8*)&val, 1);
}
}ọzọ
{
sys_write_vp (0x2000, uart2_buf, recv_len/2+2);
}
recv_len= 0;
is_recv_complete= 0;
}
sys_read_vp (0x1000, (u8*)&val, 1);
ọ bụrụ (val=1)
{
sys_read_vp (0x2100, buff, 50);
maka (i=0; i
{
ọ bụrụ (buff=0xff)
{
buff= 0x00;
buff[i+1] = 0x00;
agbaji;
}
}
u2_send_bytes(buff,strlen(buff));
val= 0;
sys_write_vp (0x1000, (u8*)&val, 1);
}
sys_read_vp (0x2400, (u8*)&val, 1);
ọ bụrụ (val!=ochie)
{
sprintf (buff,"%d", val);
u2_send_bytes(buff,strlen(buff));
ochie = val;
}
}
}
Oge nzipu: Dec-28-2023
- English
- French
- German
- Portuguese
- Spanish
- Russian
- Japanese
- Korean
- Arabic
- Irish
- Greek
- Turkish
- Italian
- Danish
- Romanian
- Indonesian
- Czech
- Afrikaans
- Swedish
- Polish
- Basque
- Catalan
- Esperanto
- Hindi
- Lao
- Albanian
- Amharic
- Armenian
- Azerbaijani
- Belarusian
- Bengali
- Bosnian
- Bulgarian
- Cebuano
- Chichewa
- Corsican
- Croatian
- Dutch
- Estonian
- Filipino
- Finnish
- Frisian
- Galician
- Georgian
- Gujarati
- Haitian
- Hausa
- Hawaiian
- Hebrew
- Hmong
- Hungarian
- Icelandic
- Igbo
- Javanese
- Kannada
- Kazakh
- Khmer
- Kurdish
- Kyrgyz
- Latin
- Latvian
- Lithuanian
- Luxembou..
- Macedonian
- Malagasy
- Malay
- Malayalam
- Maltese
- Maori
- Marathi
- Mongolian
- Burmese
- Nepali
- Norwegian
- Pashto
- Persian
- Punjabi
- Serbian
- Sesotho
- Sinhala
- Slovak
- Slovenian
- Somali
- Samoan
- Scots Gaelic
- Shona
- Sindhi
- Sundanese
- Swahili
- Tajik
- Tamil
- Telugu
- Thai
- Ukrainian
- Urdu
- Uzbek
- Vietnamese
- Welsh
- Xhosa
- Yiddish
- Yoruba
- Zulu
- Kinyarwanda
- Tatar
- Oriya
- Turkmen
- Uyghur