Is viscose stretchy

is viscose elatish?

It's about reading an anemometer (wind meter) on my pi 4.

errors keep coming

pi @ raspberrypi: ~ $ /home/pi/Desktop/Wetterstation/Wind/Wind.py

File "/home/pi/Desktop/Wetterstation/Wind/Wind.py", line 19

def calculate_speed (time_sec):

                 ^

IndentationError: unindent does not match any outer indentation level

Later the whole thing should be in an rrd database, so if you have an idea how to do it, I'm also open.

Thank you in advance

Here is my code

#! / usr / bin / python3

# -- coding: utf-8 --

from gpiozero import button

import math

import time

radius_cm = 9.0

wind_interval = 2

wind_count = 0

def spin ():

global wind_count

wind_count = wind_count + 1

def calculate_speed (time_sec):

   

global wind_count

circumference_cm = (2 * math.pi) * radius_cm

rotations = wind_count / 2.0

     

dist_cm = circumference_cm * rotations

     

speed = dist_cm / time_sec

return speed

   

wind_speed_sensor.when_pressed = spin

wind_speed_sensor = button (5)

while True:

wind_count = 0

time.sleep (wind_interval)

print (calculate_speed (wind_interval), "cm / h")