 unsigned int packetCount = 0;
 
 void loop() {
+  delay(50);
+  
+  //Serial.println(baro.read());
+  
+  Serial.print(analogRead(18));
+  //Serial.print(" ");
+  //Serial.println(analogRead(19));
+  
+  int s1 = analogRead(14);
+  if (s1 <= POS_1 + 10 && s1 >= POS_1 - 10)
+    if (current_pos != 1) {
+      current_pos = 1;
+      Serial.println("pos1");
+    }
+  if (s1 <= POS_2 + 10 && s1 >= POS_2 - 10)
+    if (current_pos != 2) {
+      current_pos = 2;
+      Serial.println("pos2");
+    }
+  if (s1 <= POS_3 + 10 && s1 >= POS_3 - 10)
+    if (current_pos != 3) {
+      current_pos = 3;
+      Serial.println("pos3");
+    }
+  
+  //Serial.println(analogRead(14));
+  
   sendQueue.Run(millis());
   
   n = RawHID.recv(receiveBuffer, 1); // 0 timeout = do not wait

  buttonHandler(4);
}

boolean bounced() {
  static unsigned long last_interrupt_time = 0;
  unsigned long interrupt_time = millis();
  if (interrupt_time - last_interrupt_time < 150) {
    last_interrupt_time = interrupt_time;
    return true;
  } else {

#include <Encoder.h>
#include <Queue.h>

#define POS_1 888
#define POS_2 931
#define POS_3 971
int current_pos = 0;

Queue sendQueue;
int n;

Encoder baro(18, 19);
    
void setup() {
  Serial.begin(9600);
