Using the Bluetooth Controller with mBot


#1

مرحبا
انا اشتريت يد التحكم makeblock
واحتاج برمجة للحركة بواسطة الزر للدوران وليس الاتجاهات و عملت برمجة لليد و يرفض التحميل


mBlock code for mBot Mega Joystick Control
#2

@nareman

مرحبًا! هل تستخدم جهاز التحكم عن بعد المزود بتقنية البلوتوث في هذه الصورة؟ فقط للتأكد، لأنني لست متأكدًا تمامًا.


Hi! Are you using the Bluetooth remote in this image? Just confirming, since I’m not totally sure.

image_2024-11-17_075834782


#3

نعم انا استخدم نفس الجهاز بالصورة وتم برمجته على الاتجاهات على جهاز
mbot

ولكن انا ارغب في برمجة اليد للتحكم بزر الدائرة للاتجاهات وليست علامة الزائد
لاتمكن من التحكم برالروبوت
mbot


#4

@nareman

هل تستخدم وحدة التحكم مع:

mBot
mbot 2 / mBot Neo
شيء آخر


Are you using the controller with the:

  • mBot
  • mbot 2 / mBot Neo
  • Something else?

#5

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


#6

@nareman

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:
image


#7

@nareman Try this:

  • Add the mBot device
  • Go to extensions:
    image
  • Find the Bluetooth Controller extension and add it:
    image
  • Switch to upload mode:
    image
  • 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 both X and Y when it is centered.
  • The motors need reversed (that’s why one block is X - Y and not X + 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:
image

LX means ‘Left joystick side-to-side value’, LY means ‘left joystick up-and-down value’, etc.

Good luck!


Control mBot Neo with Bluetooth Controller Joystick
#8

thank you soo much


#9

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).


#10

الكود ممتاز
خدمة سريعة ومنتدى جميل باحترافيه
شكرا جزيلا لكم
ناريمان قشقري

مكة المكرمة
المملكة العربية السعودية


#11

لا مشكلة! :slight_smile:


The code is excellent, the service is fast, and the forum is beautiful with professionalism. Thank you very much, Nariman Qashqari, Makkah Al Mukarramah, Kingdom of Saudi Arabia.

No problem! :slight_smile: