If you open your IDE, got to File/Examples/03.Analog there are examples.
(the first is a bit rubbish - it uses "map" with an incorrect range when a simple divide by 4 would suffice, but it will give you the basic idea)
If you open your IDE, got to File/Examples/03.Analog there are examples.
(the first is a bit rubbish - it uses "map" with an incorrect range when a simple divide by 4 would suffice, but it will give you the basic idea)