مرحبا
انا اشتريت يد التحكم makeblock
واحتاج برمجة للحركة بواسطة الزر للدوران وليس الاتجاهات و عملت برمجة لليد و يرفض التحميل
Using the Bluetooth Controller with mBot
mBlock code for mBot Mega Joystick Control
مرحبًا! هل تستخدم جهاز التحكم عن بعد المزود بتقنية البلوتوث في هذه الصورة؟ فقط للتأكد، لأنني لست متأكدًا تمامًا.
Hi! Are you using the Bluetooth remote in this image? Just confirming, since I’m not totally sure.
نعم انا استخدم نفس الجهاز بالصورة وتم برمجته على الاتجاهات على جهاز
mbot
ولكن انا ارغب في برمجة اليد للتحكم بزر الدائرة للاتجاهات وليست علامة الزائد
لاتمكن من التحكم برالروبوت
mbot
هل تستخدم وحدة التحكم مع:
mBot
mbot 2 / mBot Neo
شيء آخر
Are you using the controller with the:
- mBot
- mbot 2 / mBot Neo
- Something else?
Yes, I use the hand in the attached picture of the robot
MBOT
I need to program the hand to control the directions with the circular button
You may find my notes in response to the post shown below of some use:
You should be able to create a very similar blocks code for mBot to do this - and you will need to add the extension shown below:
@nareman Try this:
- Add the mBot device
- Go to extensions:
- Find the Bluetooth Controller extension and add it:
- Switch to upload mode:
- This code would control the mBot using the round knob on the left:
Important! I have not tested the code above. I do not have the Bluetooth remote. You may have to reverse some values or experiment to get it working; let me know.
The code assumes:
- The joystick returns negative values, but returns
0
on bothX
andY
when it is centered. - The motors need reversed (that’s why one block is
X - Y
and notX + Y
)
Also remember:
X
is side-to-side (horizontal)
Y
is up-and-down (vertical)
L
means left and R
means right, so in the block:
LX
means ‘Left joystick side-to-side value’, LY
means ‘left joystick up-and-down value’, etc.
Good luck!
No problem, be sure to let me know if the code needs to be adjusted at all (it may go in the wrong direction or something).