Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a project that will use an ESP8266 as a WiFi module (because of it's low power consumption) for a Raspberry Pi.

I also would like to use the ESP8266 to monitor a specific input, and if the input is low, output a signal on another pin on the ESP8266.

Is it possible to do both of these with one ESP8266?

share|improve this question
    
Yes it's possible. I would imagine just about any ESP-based project you find on Google will show you how. Have you done any research? – Mark Smith Feb 22 at 9:07
    
That said, using an ESP or Arduino or Raspberry Pi to invert a signal, which is what it sounds like you want to do, is a huge overkill. Is that really what you want to do? – Mark Smith Feb 22 at 9:21
    
@Mark Smith. I did a lot of research, and I cannot find anything. I thought I would ask you all. – user173724 Feb 22 at 14:04

Like Mark says, you could or you could use an invertor IC. OK I understand your not really into electronics, because you use a PI, but its not that difficult. :)

enter image description here

This is a Hex invertor, total overkill for one signal, but I've used one before. You just need to supply 2 to 5v at pin 14 and Gnd at pin 7 (You should be able to take those of the PI and then put your input into pin 1 and take the output of pin 2.

Just Google for invertor IC and then see what one you can get in the timescales you need it.

Unfortunately if you did that it makes the question off topic :(

share|improve this answer
    
The issue is I need to delay the signal to give the Pi time to safely shutdown. I was hoping the esp could be used as a WiFi card and as this, but I wanted to ask because I could not find anything online about this. – user173724 Feb 22 at 14:03

All ESP modules have at least some of the ESP's GPIO pins brought out.

There are several ways to program it, the most-on-topic for here (though strictly off topic) being to use the Arduino IDE.

This example explains how to do it.

share|improve this answer

The problem you'll likely encounter is modifying the ESP firmware to include managing the signal you want to monitor. You'll need the source to the AT interpreter code that makes the ESP act like a serial-driven WiFi shield. At the other end of the scale you'd be faced with rolling your own sketch to do both, kind of a make-work job since the AT firmware already exists. A solution external to the ESP sounds like a much more economical use of your time.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.