Input variance triggering output

Hi guys,

I'm sure someone out there will direct me to a simple answer, but I'm relatively new to the language and am not entirely sure of the simplest way to do what I'm trying to.

Essentially, I'll have a nano board operating 5 digital ins, and 5 digital outs. What I'm trying to achieve is to have a change in the input state of a pin trigger a high pulse on it's corresponding output, regardless of what the input state says (high or low).

I'm trying to make it all part of one continuous function, without the need for a reset in between reads, as the input states will vary randomly, and each output only needs to pulse when its input changes.

I haven't coded anything yet as I'm not sure where to start exactly... If anyone can give me a little direction as to what commands to use it would be greatly appreciated!

Thanks,

Gareth

Looking for a change is easy. You have a variable that holds the state of the input the last time you looked at it. Then you need to look at the pin and compaire it with the last time and output your pulse if it is not the same. The last thing in the loop should update the last time variable with what you read this time.
The if statement will look like
if( lastTime != thisTime ) {
// generate your pulse

Thanks Mike, thats exactly what I need. Answers my question completely!

Gareth