1 軟體 : Arduino ( v1.8.12 ) 會隨版本更新

2 元件及材料 :

ESP 32 板子
麵包板x1
杜邦線x4

電線x2
ledx1
220Ω 電阻x1
10k Ω 電阻x1

光敏電阻x1

Arduino

教學 : https://zanrobot.com/uncategorized/3699

下載 : tps://www.arduino.cc/zh/main/software?setlang =cn

接線圖

5V —-> +
GND —-> –
SVP —–> 光敏的端+10k
P13 —-> LED+端(腳長)

ESP 32 前置

教學 : https://zanrobot.com/uncategorized/3699

程式編碼

#include <BluetoothSerial.h>
BluetoothSerial SerialBT;//宣告藍芽物件=SerialBT

void setup() {
// put your setup code here, to run once:
Serial.begin(115200);//序列視窗
SerialBT.begin(“ESP32”);//<<藍芽名稱,請自己記得
pinMode(A0, INPUT);
pinMode(13,OUTPUT);//電燈relay
}
int pr_min = 400;
void loop() {
char analogRea=SerialBT.read();
int pr = analogRead(A0);{
Serial.println(pr);
SerialBT.println(pr);
delay(1000);
}
while(SerialBT.available())
{
char btdata=SerialBT.read();
Serial.print(btdata);//查看藍芽輸入的值
if (btdata==’3′){digitalWrite(13,HIGH);}//開電燈
if (btdata==’4′){digitalWrite(13,LOW);}//關電燈
}
delay(100);
}

手機app

先到play商店下載arduino bluetooth controller

開啟並開啟藍芽選到裝置

點擊裝置會出現此列表

按下

當程式執行成功時將出現光敏阻值
且輸入 3 Led 亮 4 Led關

執行

219 thoughts on “ESP32 雙向控制

  1. Сегодня Алексей Навальный пребывает в тюрьме, и его собственное политическое движение заявлено “противозаконна”, потому оно не имеет права действовать в России.
    А ряд его последователей приехал в другую страну, и они конечно все еще работают над списками умного голосования на грядущих выборах.
    Скажем, когда у коммуниста намного больше шансов победить избирательный округ, следует отдать голос за него, если вы лично этого не жаждете.
    Как к примеру, в случае, если у либералов намного больше вероятности выиграть избирательный район, нужно проголосовать за него, когда даже вы ненавидите их.
    Значение представленной стратегии подрезать крылья власти Единой России, а не гарантировать успех любого другого общественно-политического движения.

    умное голосование листовка

  2. You read it? Then XRumer and XEvil works

    Want to post your promo to 12.000.000 (12 MILLIONS!) websites? No problem – with new “XEvil 5.0 + XRumer 19.0.8” software complex!
    Blogs, forums, boards, shops, guestbooks, social networks – any engines with any captchas!
    XEvil also compatible with any SEO/SMM programms and scripts, and can accept captchas from any source. Just try it! 😉

    Regards, JulieJew1273

    P.S. Huge discounts are available (up to 50%!) for a short review about XEvil on any popular forum or platform. Just ask Official support for discount!

    http://xrumersale.site/

  3. It’s in point of fact a nice and useful piece of info.

    I’m satisfied that you just shared this helpful information with us.
    Please keep us up to date like this. Thank you for sharing.

  4. Hi! I know this is kind of off topic but I was
    wondering which blog platform are you using for this site?
    I’m getting sick and tired of WordPress because I’ve had problems with hackers and I’m looking at
    alternatives for another platform. I would be great if you could point me in the direction of a good platform.

  5. Hello my family member! I wish to say that
    this article is awesome, great written and include almost
    all significant infos. I’d like to see more posts like this .

  6. Thank you for some other informative site. The place else could I am getting that
    type of information written in such an ideal approach? I’ve a mission that I am just now working on, and I’ve been on the
    glance out for such info.

  7. Does your site have a contact page? I’m having trouble locating it but, I’d like to send you an email.
    I’ve got some suggestions for your blog you might be interested in hearing.
    Either way, great website and I look forward to seeing it expand over time.

  8. I have been surfing online more than 3 hours nowadays,
    but I never found any interesting article like yours. It’s pretty value
    sufficient for me. In my view, if all web owners and bloggers made just right
    content as you did, the web will likely be a lot more helpful than ever before.

  9. Aw, this was an exceptionally nice post. Taking a few minutes and actual effort to make a good articleÖ but what can I sayÖ I hesitate a lot and don’t seem to get nearly anything done.

  10. I used to be suggested this blog through my cousin. I amno longer positive whether or not this post is written through him as nobody else understand such unique about my trouble.You are wonderful! Thanks!

  11. Thank you, I have recently been searching for info about this topic for ages and yours is the greatest I have cameupon till now. However, what about the conclusion?Are you certain concerning the supply?My blog; personal cannabis seeds

  12. Right here is the right blog for everyone who would like to find out about this topic. You understand a whole lot its almost hard to argue with you (not that I really will need to…HaHa). You definitely put a fresh spin on a topic that has been written about for ages. Wonderful stuff, just excellent! Also visit my homepage

  13. I do not even know how I stopped up right here, however I believed this submit used tobe good. I don’t know who you’re but certainly you aregoing to a famous blogger if you happen to aren’t already.Cheers!

  14. Thank you for some other informative blog. The place else may just I get that kind of information written in such a perfect manner? I have a challenge that I am just now operating on, and I have been at the glance out for such info.

  15. Howdy just wanted to give you a quick heads up and let you know a few of the images aren’t loading correctly.I’m not sure why but I think its a linking issue. I’ve tried it in twodifferent internet browsers and both show thesame outcome.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>