Convert arduino_code to mbed

Can someone help me to convert this code in arduino to mbed?

#include <Servo.h>

int valor = 0;
Servo serv;
void setup() {
serv.attach(9);
}
void loop() {
valor = analogRead(0);
if(690>valor){
serv.write(60);
}
else{
serv.write(90);
}
delay(5);
}

Hello,

this not seems to be related to MbedOS Bugs section.
Usually is good to share also some info about your target, what you have achieved and so on.

Let us know when you get stuck.

BR, Jan