Cov txheej txheem:

HTTP Server Tswj LED - Ameba Arduino: 3 Kauj Ruam
HTTP Server Tswj LED - Ameba Arduino: 3 Kauj Ruam

Video: HTTP Server Tswj LED - Ameba Arduino: 3 Kauj Ruam

Video: HTTP Server Tswj LED - Ameba Arduino: 3 Kauj Ruam
Video: XAV PAUB XAV POM: Padee Yang sits down with Tojxeem Xaiv Suav Yaj. 2024, Hlis ntuj nqeg
Anonim
HTTP Server Tswj LED - Ameba Arduino
HTTP Server Tswj LED - Ameba Arduino

Kev tswj hwm LED yog ib qho yooj yim nrog txhua lub microcontroller ntawm koj xaiv, tab sis tswj LED wirelessly ntawm koj lub xov tooj ntawm tes browser ntawm kev mus yog qhov txias thiab lom zem heev. Qhov tseeb nws yog qhov haujlwm IoT twb dhau los lawm, zoo li koj tuaj yeem siv tib lub server kom tswj tau lwm yam uas tsis yog LED, piv txwv li, hais lus, teeb, kiv cua, dej txias, thiab lwm yam.

Khoom siv

  • Peb x 1
  • Breadboard x 1
  • LED x 1
  • 1KΩ Resistor x 1

Kauj Ruam 1: Teeb Kho Vajtse

Kho vajtse teeb
Kho vajtse teeb

Hauv qhov piv txwv no, peb txuas

Ameba rau WiFi thiab siv Ameba ua tus neeg rau zaub mov, tus neeg siv tuaj yeem tswj hwm LED qhib/tawm los ntawm lub vev xaib.

Ua ntej tshaj, txuas Ameba nrog LED.

Hauv LED, tus pin ntev dua yog tus ncej zoo, thiab tus pin luv yog tus ncej tsis zoo. Yog li peb txuas tus pin luv rau GND (V = 0), thiab txuas tus pin ntev dua rau D13. Ib qho ntxiv, kom tsis txhob muaj hluav taws xob tam sim no dhau qhov ua siab ntev ntawm LED thiab ua rau muaj kev puas tsuaj, peb txuas kev tiv thaiv ntawm tus ncej zoo.

Kauj ruam 2: Teeb Software

Teeb Software
Teeb Software
Teeb Software
Teeb Software

Ua ntej tshaj plaws, peb yuav tsum paub tseeb tias pob pob ameba twb tau teeb tsa lawm. Yog tsis yog, peb tuaj yeem luam qhov txuas hauv qab no rau koj "tus thawj tswj hwm ntxiv URLs" raws li qhov xav tau, thiab teeb tsa nws siv tus thawj tswj hwm tswj hwm, github.com/ambiot/amb1_arduino/raw/master/…

Tom qab ntawd qhib "File" -> "Piv txwv" -> "AmebaWiFi" -> "SimpleWebServerWiFi"

Hauv cov qauv piv txwv, hloov kho cov ntsiab lus tseem ceeb rau cov ntaub ntawv sib xws.

Tshaj tawm cov cai, thiab nias lub pob pib dua ntawm Ameba.

Kauj ruam 3: HTTP Server

HTTP neeg rau zaub mov
HTTP neeg rau zaub mov
HTTP neeg rau zaub mov
HTTP neeg rau zaub mov

Thaum tsim qhov kev sib txuas, koj yuav pom cov lus "Kom pom nplooj ntawv no ua haujlwm, qhib qhov browser mus rau https://xxx.xxx.xxx.xxx" hauv arduino IDE, raws li qhia hauv daim duab 1 saum toj no:

Tom ntej no, qhib qhov browser ntawm lub khoos phis tawj lossis lub xov tooj ntse nyob hauv tib lub npe WiFi, sau qhov chaw nyob hauv cov lus. Hauv qhov no, peb siv lub web browser ntawm PC.

Tam sim no peb tuaj yeem pom ob kab ntawm qhov browser ib yam li daim duab 2 saum toj no. Tam sim no peb tuaj yeem tswj hwm LED kom qhib lossis tua txhua lub sijhawm!

Muaj kev lom zem nrog txoj haujlwm no thiab khaws cov lej!

Pom zoo: