float aR = 353; float aL = 0; float bR = 520; float bL = 2.5; void setup() { pinMode(NINA_RESETN, OUTPUT); digitalWrite(NINA_RESETN, HIGH); Serial.begin(115200); SerialNina.begin(115200); delay(2000); //Delay 2 seconds to allow for user to get ready } void loop() { float curReading = 1023 - analogRead(0); // Take reading of analog pin 0 of Arduino float load = ((bL - aL)/(bR - aR)) * (curReading - aR) + aL; SerialNina.println(load); Serial.println(load); delay(100); }