Charlie drums

A slow drummer but nevertheless he drums:

but making he move an arm in just 2 simples steps was frustrating… spent a whole night fiddling with micropython ‘mindstorms’ library… sending script with ‘ampy’ gave stupid errors (like ‘RuntimeError: There is not a motor connected to port B.’) or even worst leading to firmware crashing so badly that I had to take the battery out of Charlie’s head at least 5 times.

So I gave up trying to use something not documented at all and reached for help from a great ROBOTMAK3R: Nard Strijbosch’s Unofficial LEGO MINDSTORMS and SPIKE Prime low-level hub module documentation

So instead of using ‘mindstorms.Motor’ I used ‘hub.port’ own motor class:

leftArm = port.B.motor
leftArm.run_for_degrees(10, speed=-100)
 while leftArm.busy(1):
 leftArm.run_for_degrees(10, speed=100)
 while leftArm.busy(1):

and now everytime I run a script through ‘ampy’ it works – except on first time after powering on Charlie’ – it seems I have to first access REPL and only after exiting it accepts ‘ampy run’ commands – if I forget to do that, Charlie turns itself off.

I am a bit disappointed with motor speed. After using the Charlie activity from the App (scratch based) I was expecting faster movements with micropython:

I need to look into the scratch demo… but I only managed to use it on my phone (on my tablet the App doesn’t load any activity) and coding is terrible on a small screen (not to mention debugging!!!).

I am not enjoying this new “paradigm”. Maybe the future is Apps and smart devices but I like to think that I can choose my own future. Can’t wait to see Pybricks running on this.


the scratch demo controls the motors through speed only, not through position. I feel cheated 😀

Deixe um comentário

O seu endereço de email não será publicado. Campos obrigatórios marcados com *