int ptm = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, พลกฤษณ์ รินทรึก ");
pinMode(35, INPUT);
pinMode(18, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
ptm = analogRead(35);
ptm=map(ptm,0,4095,0,10);
Serial.println(ptm);
analogWrite(18,ptm);
}