Estoy jugando con un BBC: micro usando EspruinoJS y me gustaría controlar un par de Mini servos de rotación continua Feetec FS90R (hoja de datos del enlace pdf).
No tuve suerte con digitalPulse
y solo moderé los resultados con analogWrite
:
analogWrite(D1,0.0295,{freq:20});
casi detiene el servo continuo, al menos un poco mejor que 0.3
,
aunque de vez en cuando todavía gira un poco.
analogWrite(D4,0.02,{freq:20});
y
analogWrite(D4,0.04,{freq:20});
gire el servo bastante rápido CW / CCW como se esperaba.
Aparte del hecho de que no puedo detener el servo de forma confiable, El otro gran problema al que me enfrento es que ningún otro pines ADC parece funcionar:
>analogWrite(D0,0.0295,{freq:20});
Uncaught InternalError: Timeout on Utility Timer
at line 1 col 32
analogWrite(D0,0.0295,{freq:20});
^
>analogWrite(D2,0.0295,{freq:20});
Uncaught InternalError: Timeout on Utility Timer
at line 1 col 32
analogWrite(D2,0.0295,{freq:20});
^
>analogWrite(D3,0.0295,{freq:20});
Uncaught InternalError: Timeout on Utility Timer
at line 1 col 32
analogWrite(D3,0.0295,{freq:20});
^
>analogWrite(D4,0.0295,{freq:20});
Uncaught InternalError: Timeout on Utility Timer
at line 1 col 32
analogWrite(D4,0.0295,{freq:20});
^
>analogWrite(D10,0.0295,{freq:20});
Uncaught InternalError: Timeout on Utility Timer
at line 1 col 33
analogWrite(D10,0.0295,{freq:20});
^
>analogWrite(D11,0.0295,{freq:20});
Uncaught InternalError: Timeout on Utility Timer
at line 1 col 33
analogWrite(D11,0.0295,{freq:20});
^
>analogWrite(D19,0.0295,{freq:20});
Uncaught InternalError: Timeout on Utility Timer
at line 1 col 33
analogWrite(D19,0.0295,{freq:20});
Normalmente uso MicroPython en micro: bit, pero me gustaría usar Espruino para poder usar Bluetooth para controlar los servos.
¿Cómo puedo conducir dos servos usando Espruino en micro: bit?