Përmbajtje:

Krah i kontrolluar me smartphone të lirë (+ Pozicioni i kursimit sipas opsionit): 5 hapa
Krah i kontrolluar me smartphone të lirë (+ Pozicioni i kursimit sipas opsionit): 5 hapa

Video: Krah i kontrolluar me smartphone të lirë (+ Pozicioni i kursimit sipas opsionit): 5 hapa

Video: Krah i kontrolluar me smartphone të lirë (+ Pozicioni i kursimit sipas opsionit): 5 hapa
Video: Dëgjimi i drejtpërdrejtë: Koleksioni i plotë #BringYourWorth (Audio zyrtare) 2024, Korrik
Anonim
Krah i lirë i kontrolluar nga smartphone (+ Pozicioni i kursimit të opsionit)
Krah i lirë i kontrolluar nga smartphone (+ Pozicioni i kursimit të opsionit)
Krah i lirë i kontrolluar nga smartphone (+ Opsioni i kursimit të pozicionit)
Krah i lirë i kontrolluar nga smartphone (+ Opsioni i kursimit të pozicionit)

Projekti

Drejtoni një krah robotik të kontrolluar nga smartphone duke përdorur pajisje bluetooth.

Bonusi i mënyrës: ne kemi një buton që lejon arduino të mbajë mend një pozicion. Sa herë që duam, mund të shkojmë në këtë pozicion të ruajtur me një buton tjetër.

FR

LE PROJET

Komandant un bras robotisé construit à partir de carton dhe de servo-motore.

Le bras sera constitué d'une pince qui doit pouvoir prendre et poser un objet.

Në commandera le bras par smartphone qui communiquera dhe bluetooth à l'arduino.

Bonusi i mënyrës: Nuk mund të gjeni një pozicion të përshtatshëm për sutjenat. Lorsque l'on le souhaitera, nous pourrons retourner position la position sauvegardée.

Hapi 1: Materialet që ju nevojiten

Materialet që ju nevojiten
Materialet që ju nevojiten

EN

1 Arduino UNO

4 servo-motorë SG90 (9g, çift rrotullues: 1kg.cm)

1 Stepper Motors 5V 24BYJ48 (çift rrotullues: 39mN.m)

1 drejtues për motorët stepper DRV8825

1 ushqim 9V + 6V për motorët

1 modul Bluetooth HC-06

Pistoletë ngjitëse, kuti kartoni, tela, elasktike

FR

1 modul Arduino Uno

4 servo-moteurs SG90 9g (çift: 1kg.cm)

1 moteur pas-à-pas 5V (39mN.m) 24BYJ48

1 shofer moteur pap DRV8825

1 ushqim 9V për l'arduino dhe 6V për les moteurs

1 modul Bluetooth HC-06 Pistolet à koleg, karton, lidhje fils, elastikë

Hapi 2: SETUP

VENDOSJE
VENDOSJE

FR

ETAPE 1: Moduli Bluetooth Le moduli bluetooth (HC-06) është i lidhur me manière suivante:

Rx Tx

Tx Rx

GND GND

VCC +5V

Il va permettre d'établir la communication entre l'Arduino dhe le smartphone, nëpërmjet la voie Série (9600).

ETAPE 2: Le moteur pas à pas 24BYJ48

Nous avons connecté le moteur bipolaire pas pas 24BYJ48 à bir shoferi shoqërues në qarkun ULN2003. Il suffit de connecter les inputet INx (x = 1, 2, 3, 4) aux sorties digitales de l'arduino. Në alimentera le driver en +5V.

Pour coder, nous utiliserons la bibliothèque Stepper.h, ce qui nous permet de command facilement le moteur en lui donnant la vitesse: nom.setSpeed (vitesse), ainsi que le pas désiré: nom.step (+ou-pas)

ETAPE 3: Les servo-moteurs SG90

Les servos moteurs se lehtësimi komandant. Il suffit de brancher le fil rouge au +5V, le noir à la masse et le fil restant à une sortie PWM de l'arduino. Në choisira ensuite l'angle du servo nëpërmjet la PWM (0 à 255).

Nous utiliserons la bibliothèque servo.h pour command facilement le servo. Tout d'abord, on initialera le servo par son nom: Servo nom_servo, puis on lui rattachera la commande PWM: nom_servo.attach (pin choisi). Enfin, në commandera l'angle voulu: nom_servo.write (këndi 0 à 180).

ETAPE 4: Mbështetje për fabrikimin Le suportoni fab été fabriqué en carton. Après avoir réalisé la base sur laquelle va tourner le bras et ou sera mis le moteur pas dhe pas, nous avons collé les servos moteurs à du carton pour donner la forme finale. La pince été créée à partir de bâton de glace et fonctionne avec un élastique

Hapi 3: Kodi

Kodi
Kodi

// 2017-02-24 - Programi C - Komandat e shërbimeve të tjera ndihmëse të dinamikave të smartphone, nëpërmjet bluetooth - Aplikuesi i shpikësit 2 përdorues - Carte Arduino (ici UNO), moduli Bluetooth // Ce program a pour objectif de: //// Le moteur (fils 1 2 3 4) est degé sur sur sorties 8 12 10 11 de l'Arduino (et sur GND, +V) Stepper small_stepper (HAPAT, 8, 10, 12, 11); // ******************** DEKLARATA ************************* * përfaqësues i fjalës; // mot envoyé du module Arduino ose smartphone në int cmd = 3; // variable commande du servo moteur (troisième fil (portokalli, jaune)) Servo moteur; // në shërbimin e përcaktuar notre int cmd1 = 5; Servo moteur1; Servo moteur2; Servo moteur3; int cmd2 = 9; int cmd3 = 6; int kënd2, kënd3; këndi int; këndi int; int pas; int r, r1, r2, r3; int regjistrues; fjala w; // ndryshues i dërguar i smartphone ose modul Arduino int angle; // këndi i rrotullimit (0 në 180) // ******************* SETUP ***************** ****************** void setup () {moteur.attach (cmd); // on relie l'objet au pin de commande moteur1.attach (cmd1); moteur2.attach (cmd2); moteur3.tash (cmd3); moteur.shkruaj (12); moteur1.shkruaj (23); Serial.filloj (9600); // permettra de communiquer au modul Bluetooth} // ******************* BOUCLE ****************** ***************** void loop () {recevoir (); // për marrjen e informacionit nga smartphone, ndryshore w nëse (w == 206) riprodho (); // vous nous permettre de reproduire la position enregistrée if (w == 205) enregistrer = 1; // va nous permettre d'enregistrer la valeur des servos moteurs lorsque l'on apuiera sur un bouton nëse (w == 204) regjistrues = 0; për (int k = 100; k <151; k ++) {nëse (w == k) {kënd2 = hartë (k, 100, 150, 0, 180); moteur2.shkruaj (këndi2); nëse (regjistrues == 1) r2 = kënd2; }} për (int j = 151; j <201; j ++) {if (w == j) {angle3 = hartë (j, 151, 200, 0, 150); moteur3.shkruaj (këndi3); nëse (regjistruesi == 1) r3 = këndi3; }} për (int i = 0; i <34; i ++) {nëse (w == i) {kënd = hartë (i, 0, 34, 0, 70); moteur.shkruaj (kënd); nëse (regjistruesi == 1) r = këndi; }} për (int l = 34; l <= 66; l ++) {nëse (w == l) {këndi1 = hartë (l, 34, 66, 90, 0); moteur1.shkruaj (këndi 1); nëse (regjistruesi == 1) r1 = këndi1; }} për (int m = 67; m <= 99; m ++) {nëse (w == m) {nëse (w86) {small_stepper.setSpeed (80); small_stepper.step (-5);} tjetër small_stepper.step (0); }}} // ************************** FONKSIONET **************** ******************** void reproduire () // fonction permettant de reproduire la position sauvegardée {moteur2.write (r2); moteur.write (r); moteur1. shkruaj (r1); moteur3.shkruaj (r3); } void recevoir () {// fonction permettant de recevoir l'informacion për smartphone nëse (Serial.të disponueshëm ()) {w = Serial.read (); Serial.flush (); }} - Connecter le Servo moteur + modul bluetooth au module arduino // - Envoyer un mot/phrase/nombre au smartphone // - Merrni komandën përmes smartphone // Programi i përcaktuar nga Techno_Fabrik // ********* *********** BIBLIOTHEQUES ************************** #përfshijnë #përfshijnë // bibliothèque permettant d ' utiliser les commandes pour servomoteurs facilement #include

Hapi 4: Aplikacioni i smartphone -it (Krijuar në APP Inventor 2)

Smartphone APP (Made on APP Inventor 2)
Smartphone APP (Made on APP Inventor 2)

Hapi 5: Realizimi i videos

Faleminderit që shikuat.!

Për të ditur më shumë, kontrolloni faqen tonë të internetit:

Ose na ndiqni në Google +:

Faleminderit !

Recommended: