Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2023:avaduva:rc_car [2023/05/28 23:24]
radu.mitcan [Software Design]
pm:prj2023:avaduva:rc_car [2023/05/28 23:41] (current)
radu.mitcan [Download]
Line 30: Line 30:
  
 The code begins by including the necessary libraries. AFMotor is the library for controlling motors using the Adafruit Motor Shield, and SoftwareSerial is used for communication with the Bluetooth module. The code begins by including the necessary libraries. AFMotor is the library for controlling motors using the Adafruit Motor Shield, and SoftwareSerial is used for communication with the Bluetooth module.
 +
 +{{:​pm:​prj2023:​avaduva:​p1.png?​300|}}
  
 Four motor objects are created using the AF_DCMotor class from the AFMotor library. These objects represent the individual motors connected to the motor shield. The parameters passed to the constructor specify the motor number and the frequency at which it operates. Four motor objects are created using the AF_DCMotor class from the AFMotor library. These objects represent the individual motors connected to the motor shield. The parameters passed to the constructor specify the motor number and the frequency at which it operates.
Line 38: Line 40:
  
 After reading the command, the Stop() function is called to ensure that all motors are stopped before executing the new command. After reading the command, the Stop() function is called to ensure that all motors are stopped before executing the new command.
 +
 +{{:​pm:​prj2023:​avaduva:​p2.png?​300|}}
  
 Based on the received command, the code enters a switch statement to determine the action to be performed. If the command is '​F',​ the forward() function is called, which sets the motors to rotate forward. Similarly, for '​B',​ '​L',​ and '​R'​ commands, the back(), left(), and right() functions are called, respectively. Based on the received command, the code enters a switch statement to determine the action to be performed. If the command is '​F',​ the forward() function is called, which sets the motors to rotate forward. Similarly, for '​B',​ '​L',​ and '​R'​ commands, the back(), left(), and right() functions are called, respectively.
 +
 +{{:​pm:​prj2023:​avaduva:​p3.png?​300|}}
  
 The forward() function sets the speed of all the motors to 255, which is the maximum velocity. Then, it calls the run() function for each motor with the FORWARD parameter, causing them to rotate in the clockwise direction. The forward() function sets the speed of all the motors to 255, which is the maximum velocity. Then, it calls the run() function for each motor with the FORWARD parameter, causing them to rotate in the clockwise direction.
Line 48: Line 54:
 ===== Rezultate Obţinute ===== ===== Rezultate Obţinute =====
  
-<note tip> 
-Care au fost rezultatele obţinute în urma realizării proiectului vostru. 
-</​note>​ 
  
 ===== Concluzii ===== ===== Concluzii =====
Line 56: Line 59:
 ===== Download ===== ===== Download =====
  
-<note warning>​ +Code:{{:pm:prj2023:avaduva:bluetooth_car.ino.zip?300|}}
-O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectuluisurse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-). +
- +
-Fişierele se încarcă pe wiki folosind facilitatea **Add Images or other files**. Namespace-ul în care se încarcă fişierele este de tipul **:pm:prj20??:c?** sau **:pm:​prj20??:​c?:​nume_student** (dacă este cazul)**Exemplu:​** Dumitru Alin, 331CC -> **:​pm:​prj2009:​cc:​dumitru_alin**. +
-</​note>​ +
 ===== Jurnal ===== ===== Jurnal =====
  
pm/prj2023/avaduva/rc_car.1685305455.txt.gz · Last modified: 2023/05/28 23:24 by radu.mitcan
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0