OpenWrt Forum Archive

Topic: Reading from a GPIO input - More information required.

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

All,

I have a Motorola WR850G and as explained in the wiki have found the input pads for GPIO 4.  Using the gpiotest program I have turned it on and off and found that I can toggle a 5v output on it (note: not a 3v).

I want to use this GPIO as an input.  I am planning to use it with LIRC and plan to connect a IR receiver circuit to it.  Elsewhere on this forum, there is a precompiled LIRC working with gpio (both for sending IR and receiving IR). I intend to use that to receive IR. 
The circuit without an IR has 5v on it and when blasted with IR gives me 3.x volts (measured using a multimeter).  I am not sure if it is bringing/pulling it down to 0v and my multimeter is simply showing an average !

I don't know much about electronics. The questions I have is:
- How do I know whether a gpio port is in or out or supports both ?
- Can I connect this IR receiver circuit into the gpio pad without blowing it up ?
- In terms of a gpio input, does it work by sensing a presence or absence of voltage at the pad ? And is this 5v or 3v ?
- Will I be able to read the 0-5v pulses coming from the IR receiver ? 

Thanks for your help,
Arun

Just add a resistor of about 1k to limit the current. The meter would show an average with any serial data, including IRDA.
Could you just connect it to a serial port? I don't think driving IRDA from scratch would work very well.

The discussion might have continued from here.