Zum Inhalt springen

Projekte

#17 Gesture Controlled ARM Pan Tilt Project With micro:bit

von PicoBricks Team 27 May 2025

Robot arms have replaced human labor in the industrial field. They undertake tasks such as carrying and rotating loads that are too heavy or large for a human to handle in factories. Their ability to be positioned with precision up to one-thousandth of a millimeter surpasses the precision achievable by human hands. When you watch production videos of automobile factories, you will see how crucial robot arms are. They are called "robots" because they can perform the same task infinitely by being programmed. The reason for calling them "arms" is because they have an articulated structure similar to our arms. The number of axes a robot arm can rotate and move in determines its degrees of freedom. Robot arms are also used in carving and shaping aluminum and various metals. These devices, known as 7-axis CNC routers, can shape metals similar to how a sculptor shapes clay.

Depending on the purpose of use in robot arms, both stepper motors and servo motors are utilized. PicoBricks enables you to create projects using servo motors.

In this project, we will use the "gesture" feature of the PicoBricks gesture module to detect up-down, right, and left hand movements, and move a pan-tilt system accordingly. Additionally, when we press the "A" button on the Micro:Bit, we will reset the servo motors to their initial positions to center the system.

Note: By mounting the RGB LED module on the front surface of this system, we can create a lighting system that can move in two axes.

Connection Diagram:

You can prepare this project without making any cable connections.


Project Images:


Installation Images

 

The STL Files of The Project


You can access the STL files of the project by scanning the QR code or opening the link in
your browser.

 https://rbt.ist/thingiverse

MakeCode Code of The Project


Python Code of The Project:


#Gesture Controlled Arm Pantilt Project
from microbit import *
from picobricks import *
import music
        
# Function Initialization
apds = APDS9960()
apds.init_gesture_sensor()
motor = motordriver()

motor.servo(1,0)
motor.servo(2,0)

display.show(Image.YES)

def left_image():
    display.show(Image('00900:'
                       '09000:'
                       '99999:'
                       '09000:'
                       '00900'))

def right_image():
    display.show(Image('00900:'
                       '00090:'
                       '99999:'
                       '00090:'
                       '00900'))

def up_image():
    display.show(Image('00900:'
                       '09990:'
                       '90909:'
                       '00900:'
                       '00900'))

def down_image():
    display.show(Image('00900:'
                       '00900:'
                       '90909:'
                       '09990:'
                       '00900'))
    
while True:
    gesture = apds.read_gesture()
    if gesture=="RIGHT":
        motor.servo(1,0)
        right_image()
        music.play(['c'])
    elif gesture=="LEFT":
        motor.servo(1,180)
        left_image()
        music.play(['c'])
    elif gesture=="UP":
        motor.servo(2,0)
        up_image()
        music.play(['c'])
    elif gesture=="DOWN":
        motor.servo(2,180)
        down_image()
        music.play(['c'])
    elif button_a.is_pressed():
        motor.servo(1,0)
        motor.servo(2,0)
        display.show(Image.YES)


MicroBlocks Code of The Project

 

Vorheriger Beitrag
Nächster Beitrag

Danke fürs Abonnieren!

Diese E-Mail wurde registriert!

Shoppen Sie den Look
Wählen Sie Optionen

Picobricks
Melden Sie sich für exklusive Updates an, Neuankömmlinge und Insider-Rabatte

Bearbeitungsoption

Benachrichtigung wieder auf Lager

Vergleichen

Produkt ArtikelnummerBewertungBeschreibung Sammlung Verfügbarkeit Produktart Andere Details
this is just a warning
Anmeldung
Einkaufswagen
0 Artikel
Same Day Shipping No Extra Costs
Easy Returns Guarantee Return with Ease
Secure Checkout Secure Payment