title: Absolute Encoder hexadecimal input
body: <p>Question: How do I receive input from a absolute encoder that makes it output in hexadecimal/grey code into a Arduino? do I use a <code>digitalRead</code> or <code>analogRead</code> command? I could not find example code/projects with a absolute encoder online.  </p>
  
  <p>Overall Objective: I want to use a absolute encoder as a knob for a project. The idea is that the encoder will output its position as a state to be used in a case statement. I.e:</p>
  
  <p>case1: <code>analogRead(absEncdr == 00)</code>
  arduino enters idle routine</p>
  
  <p>case2: <code>analogRead(absEncdr == 11)</code>
  arduino enters button routine</p>
  
  <p>etc</p>
  
  <p>details: Abs encoder type: 25LB22-G
  encoder datasheet is <a href="http://www.grayhill.com/assets/1/7/Mech_Encoder_25L.pdf" rel="nofollow noreferrer">here</a>.</p>
  
  <p>I'm using the hexidecimal/ grey code 4-Bit  Binary  Code    Hexadecimal-16  Position encoder version</p>
  
  <p>Basically, I'm not sure how to read in this abs encoder into my Arduino.</p>