Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup()
- {
- Serial.begin(9600);
- }
- float termometr(){
- float Temp;
- float Volt = (analogRead(0)/1024.0)*5000;
- Temp=(Volt/10)-273.15;
- return Temp;
- }
- void loop()
- {
- int petla=0;
- float wynik=0;
- while(petla < 10){
- wynik=wynik+termometr();
- petla++;
- delay(100);
- }
- petla=0;
- float srednia = wynik/10;
- Serial.println(srednia);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement