NOOB

Hi, first of all im going to be making a 3 or 4x DS18B20 temperature display off the single ATMEGA chip, i found some code that had it setup for two probes, and i modified it to show 3. HOWEVER, i noticed that it had:

#define tture 14 //found with
#define tture 15 //found with
#define tture 16 //modified in, following number series

here is the one i added, but then it occured to me that since the ATMEGA chips only go from 'digital pin 0 through 13', where would the 14 have come from and would it be fine if i were to change it to 'digital pin 2, 3, 4, and/or 5' ?

unfortunately my display and DS18B20s aren't due to arrive for another week or two, so i was trying to get my head around some coding for it to start with.

then my next question is how would i add a buzzer that goes off when any given probe records a temperature exceeding above a set limit.

the buzzer is because im making a manual fan speed controller simply because i like certain thing to be controlled manually, and im usually too lazy to continually check the temperature of what will be 'room temp' 'CPU temp' 'water temp' and 'case temp' which will not be need to be buzzered because that is nearly uncontrollable, simply there for show

i did only get my UNO programmer a few days ago, and made various LED fancy tricks happen, such as make the flashing continually speed up then re-loop and making a night rider scanner by simply stating the power level of each LED (yes i know its basic as all anything) however this fiddling around has let me get a grasp of some of the more basic coding more easily.

thanks

Don't confuse the ATMEGA chip with the Arduino environment.
Arduino pin 14 is the digital alias of analogue pin zero.

Your #defines all have the same name - this won't do what you want.

Have you seen this lib: MilesBurton.com Very usefull for the DS18B20's

rob

sorry i was typing in what they were and the #define tture is actually #define tture1 14
etc so that each is different. :slight_smile:

and so defining a 'pin' is defining its actual pin number, not what the digital pin number on the board is? making it useable for any application outside the board...... right?

and that library is not seeming to open the webpage for me, nor is googling the main area of it, which becomes annoying

No, the Arduino pin numbers have nothing at all to do with the physical pins or their numbers - they are just a convenient mapping.

if thats the case then what does the 14 stand for in relation to the chip itself? also that site has decided to work now and that might be very useful later, thanks

If you go to the hardware section of arduiono.cc and look up the various arduino schematics, you can see that, on the deumilanove for example, analog pins A0 thru A5 are ATMega pins 23-24-25-26-27-28, which go out to the header connector. If you call them inputs/outputs 14-19 when assigning them in setup(), the compiler does the background work select the internal circuits to make them digital pins vs analog pins.

See if this page helps:-

Nothing there shows that A0 is used as D14. Not sure where I came across that originally.