#include SoftwareSerial mySerial(2 ,3 );//RX,TX const int analogInPin = A0;//Analog input pin that the potentiometer //const int analogInPin1 = A1;//KENA TUKAR SEB DIA IDENTIFIER CAM CHAR INT // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: pinMode(A0,INPUT); //pinMode(A1,INPUT); Serial.begin(9600); mySerial.begin(9600); } // the loop routine runs over and over again forever: void loop() { int sensorValue1 = analogRead(A0) ; //value read from the pot //int sensorValue2 = analogRead(A1) ; float voltageValue1 = sensorValue1 * (5.0 / 1023.0); //value outputto the PWM(analog out) //float voltageValue2 = sensorValue2 * (5.0 / 1023.0); if(sensorValue1 <= 1022){ int sensorValue1 = Serial.parseInt(); mySerial.println(sensorValue1); } if(voltageValue1 <= 5 ){ float voltageValue1 = Serial.parseFloat(); mySerial.println(voltageValue1); } //wait 2 miliseconds before the nect loop delay(1000); // delay in between reads for stability }