0

Im currently new on this and sucessfully made a sound-activated alarm with Arduino Uno and a microphone sensor. (If sound is detected, then it will alarm). Now, I am adding a ESP 8266 module into it so it can perform a HTTP GET or POST to IFTT Maker link.

My problem with it is how can I program the esp with arduino uno? Do I do something like this

https://github.com/bportaluri/WiFiEsp/blob/master/examples/WebClient/WebClient.ino

(and add the threshold for the microphone sensor, buzzers and LEDs)??

Thanks for helping

asked May 2, 2018 at 16:04
2
  • That would work if your ESP8266 had the AT+ firmware flashed onto it by default. What exact module do you have? If you have a NodeMCU board you might as well work on the ESP8266 directly for everything Commented May 2, 2018 at 16:58
  • Im using the small one with 8 pins (esp-01). Thanks Commented May 2, 2018 at 17:33

1 Answer 1

1

Yes, the library

Is suited for your task because it implements talking to a ESP8266 over a software serial. On this serial connection, AT+ commands will be sent. This also means that you must have the AT firmware flashed onto your ESP-01.

If that is not the case you can download the binary image here and flash it with a serial adapter, as instructed with the tools on that page. You can check whether your ESP8266 has the firmware flashed by attach a UART adpater to the TX output. It should print a "ready" on bootup.

For your wire-up, you will just have to add VCC (+3.3V), GND, TX and RX connections to the ESP-01 board, preferable with a big capacitor between VCC and GND, as the ESP8266 draws a lot of power when sending data over WiFi.

answered May 2, 2018 at 18:00
4
  • Is it ok if i use something like this to connect so can use 5V instead? link Commented May 3, 2018 at 12:27
  • @HenrikhA. The ESP8266 is a 3.3V device, if you supply it with 5V it dies. It should also not receive a 5V signal. You will need a level shifter from the Arduino TX line to the ESP's RX line with a voltage divider. See martyncurrey.com/arduino-to-esp8266-serial-commincation Commented May 3, 2018 at 13:02
  • @HenrikhA. Ah, I didn't see the link at the end. Yes, the adapter has a voltage regulator and bi-directional level shifters already on there. This module should be fine and you could give +5V (or V_USB) as VCC on there. Commented May 3, 2018 at 13:06
  • I think I know what to do now. Thanks @Maximilian Commented May 3, 2018 at 15:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.