 #include <ESP8266WiFi.h>
+#include <PID_v1.h>
+
 extern "C" {
 #include "user_interface.h"
 }

int ltp=0;      // left motor target position 
float av, th;   // average & angular velocity
int ti=0;
int gv=8;        // goal velocity
float kpl=2;     // Kp from PID
float kpr=2;     // Kp from PID

os_timer_t myTimer;

// start of timerCallback
void tic(void *pArg) {
  lv=lmc-lmc0;            // lv left instant velocity

  Serial.print(th);
  Serial.print(" av: ");
  Serial.print(av);
  Serial.print(" lSet: ");
  Serial.print(lSet);
  Serial.print(" lIn: ");
  Serial.print(lIn);
  Serial.print(" lOut: ");
  Serial.print(lOut);
  Serial.print(" lkp: ");
  Serial.print(lkp);
  Serial.print(" lki: ");
  Serial.print(lki);
  Serial.print(" lkd: ");
  Serial.println(lkd);
  pidupdate();
  delay(1000);
}//read int or parseFloat for ..float...

