|
From: | Jan Fristedt |
Subject: | Re: [avr-chat] Getting started |
Date: | Sat, 5 Jan 2008 05:49:46 +0100 |
User-agent: | KMail/1.9.6 (enterprise 0.20070907.709405) |
On Friday 04 January 2008 23:55:25 J D Freeman wrote: > while(1) > { > uint8_t x; > x = PIND; > if( x != 0) > { Which pin of PIND is connected to your switch? All of them? Maybe you should try a mask? "if (x & 0x01)" for example. /Janne -- You have the capacity to learn from mistakes. You'll learn a lot today.
[Prev in Thread] | Current Thread | [Next in Thread] |