#embedded
2 APIs con questa etichetta
RC Servo & PWM API
RC-Servo- und PWM-Mathematik als API, lokal und deterministisch berechnet – die Pulsweiten-, Winkel- und Tastverhältnis-Zahlen, mit denen ein Robotik-, RC- oder Embedded-Entwickler ein Servo ansteuert. Der Winkel-Endpunkt wandelt eine Pulsweite in den Servowinkel um: Ein Hobby-Servo liest die Breite des Pulses (nicht das Tastverhältnis), daher wird der Standardbereich 1000–2000 µs linear über den Verfahrweg abgebildet, wobei 1500 µs der Mitte entsprechen – Winkel = (Puls − Min) ÷ (Min-Max-Spanne) × Verfahrweg – und es wird gemeldet, wenn ein Puls mehr als den konfigurierten Bereich anfordert, damit Sie das Servo nicht in seine mechanischen Anschläge fahren. Der Puls-Endpunkt arbeitet in die andere Richtung und liefert die Pulsweite, die ein Mikrocontroller für einen Zielwinkel schreiben sollte (90° entspricht 1500 µs bei einem 1000–2000 µs / 180° Servo), genau das, was eine Arduino-ähnliche Servobibliothek intern berechnet. Der Duty-Endpunkt wandelt einen Puls und eine Refresh-Frequenz in die PWM-Periode und das Tastverhältnis um: Ein 50-Hz-Servorahmen ist 20 ms, daher ist ein 1500-µs-Puls nur 7,5 % Tastverhältnis – der Wert, den ein Timer-Peripheriegerät benötigt – und schnellere Rahmen für digitale Servos oder Multirotor-ESCs (z. B. 333 Hz) ändern dies. Alles wird lokal und deterministisch berechnet, daher ist es sofort und privat. Ideal für Robotik- und RC-Firmware, Mikrocontroller- und Embedded-Tools, Drohnen- und Animatronik-Projekte sowie Maker-Rechner. Reine lokale Berechnung – kein Key, kein Drittanbieterdienst, sofort. 3 Compute-Endpunkte. Für Stepper-Schritte-pro-mm verwenden Sie eine Stepper-Motor-API.
api.oanor.com/servo-api
Voltage Divider API
Resistive voltage-divider circuit design as an API, computed locally and deterministically. The divide endpoint takes an input voltage and two resistors and returns the output voltage Vout = Vin·R2/(R1+R2), the current I = Vin/(R1+R2) that flows through the chain, and the power dissipated in each resistor and in total — a 12 V source with R1 = 1 kΩ and R2 = 2 kΩ gives 8 V at 4 mA. The loaded endpoint adds a load resistor across R2, computes the parallel combination R2′ = R2·RL/(R2+RL) and the loaded output Vout = Vin·R2′/(R1+R2′), and reports the droop in volts and percent against the unloaded value, the classic mistake when a divider feeds a real load. The resistor endpoint sizes the missing resistor for a target output — R2 = R1·Vout/(Vin−Vout) or R1 = R2·(Vin−Vout)/Vout — so you can pick parts for a reference or sensor-bias point. All quantities are volts, ohms, amps and watts. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics, embedded, hardware, sensor-interfacing and EE-education app developers, reference-voltage and bias-network tools, and maker software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is the resistive divider; for a single Ohm’s-law relationship use an Ohm’s-law API and for RC/RL filters an RC-filter API.
api.oanor.com/voltagedivider-api