arduino based elastic width measurement

Ok I am very new to all this, Code tags??