/v1/pulse
Pulse width for a target angle
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-Snippets
curl "https://api.oanor.com/servo-api/v1/pulse" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/servo-api/v1/pulse", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/servo-api/v1/pulse");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/servo-api/v1/pulse",
headers={"x-oanor-key": "oanor_test_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"data": {
"note": "The pulse width for an angle inverts the servo map: pulse = min + (angle ÷ travel) × the min-to-max span, so on a 1000–2000 µs / 180° servo, 90° is 1500 µs and 45° is 1250 µs. This is the number a microcontroller writes to the servo each frame (about every 20 ms); libraries like Arduino's Servo take the angle and do exactly this conversion under the hood.",
"inputs": {
"max_us": 2000,
"min_us": 1000,
"angle_deg": 90,
"range_deg": 180
},
"pulse_us": 1500
},
"meta": {
"timestamp": "2026-06-06T23:53:51.426Z",
"request_id": "5d1b7465-abbe-47c5-9dfb-058d473df9c1"
},
"status": "ok",
"message": "Servo pulse",
"success": true
}