If you place French signal inside a Chinese processor it will compile into English.
@freaker1266 жыл бұрын
cool. i love the micro bit. so small and simple but can run servo!
@DownhillAllTheWay3 жыл бұрын
Is there a way of sensing when a servo has reached its target angle? I know I can use a pause to give it enough time to get there, but that will always be too short or too long (there's almost a 0% chance of getting it exact). It would be nice to be able to get on with whatever you want to do when it reaches that angle, rather than wasting time.
@ElektorTV3 жыл бұрын
The only way to do that is to add a sensor (e.g. a mechanical or optical switch or a perforated disk or a potentiometer) to measure the sensor angle and give feedback.
@DownhillAllTheWay3 жыл бұрын
@@ElektorTV Thanks for the reply. It's what I expected, though I had hoped that there was some little-known feedback from a typical servo that would do it. After all, they have a potentiometer in them and a microcontroller, so they have the 'smarts', though they would need a four-wire connection if they were going to transmit.
@ElektorTV3 жыл бұрын
@@DownhillAllTheWay Servos are often quite easy to modify, so you might try to bring out that fourth wire yourself.
@liviosemeraro29514 жыл бұрын
Hey, amazing video a big thank's to you, but I have a question, what is the pin0.set_analog_period(value) ? ^^ happy coding !
@ElektorTV4 жыл бұрын
Set the period of the PWM signal being output on pin0 to period in milliseconds. The minimum valid value is 1ms.
@liviosemeraro29514 жыл бұрын
@@ElektorTV It's used for ? And thank you for you answer ^^
@ElektorTV4 жыл бұрын
@@liviosemeraro2951 The typical RC servo expects to see a pulse every 20 ms, which is why the PWM signal is set to a period of 20 ms. pin0.write_analog controls the width of the PWM pulse, which determines how far the servo will turn.
@ianhydes58057 жыл бұрын
the title is a bit misleading, you're controlling a servo not a stepper motor
@ElektorTV7 жыл бұрын
You're right Ian, thank you for pointing this out to me.
@ianhydes58057 жыл бұрын
no problem. I didn't watch the whole video, just flicked through but it looked good for servo information. I'm just frustrated that I'm struggling to find much information on driving stepper motors or external interrupts for the micro bit. I'll get there I'm sure. Have fun, its neat technology