a) Every where i look i hear digital sensors are 0 or 1, but what about the temp sensor ds18b20. Is it because it runs on a bus allows it to be digital but to give range with in 0/1?
b) If i had another type of digital sensor that worked on a 0/1 basis, say a temperature one, is it the code/sketch that turns it from 0 to 1. I.e the code/sketch say, once reach 85'c (more precisely the voltage) class as on?
Many thanks, this might sound like a noob question but i cant get my head around this part.
An analog temperature sensor like the lm35 will give you a voltage between 0 and 5V that corresponds to a temperature (look into the datasheet how).
A digital temperature like the ds18b20 sensor will send you the temperature encoded binary. E.g. 00011010 may mean 26°C. Of course, usually it is more complicated (look into the datasheet how).
The advantage of the latter is that you don't have to worry so much about voltage drops in the cable and such. I would say it is a little more robust against small errors, but as it is with digital communication, strange things may happen, like here: