모터 캐리어
MKR Motor Carrier 또는 Nano Motor Carrier에서 2개의 인코더 입력을 사용하여 폐루프 제어 방식으로 서보, DC 모터의 M1과 M2를 제어합니다. 모터 캐리어 함수를 사용하기 전에 arduino
객체를 만듭니다. 자세한 내용은 Connect to Arduino Hardware 항목을 참조하십시오.
함수
motorCarrier | Connection to Arduino MKR Motor Carrier or Nano Motor Carrier |
pidMotor | Connection to motors in closed-loop PID control on Arduino MKR Motor Carrier or Nano Motor Carrier |
readAngularPosition | Read angular position of DC Motor in closed-loop control |
readSpeed | Read current rotational speed of DC Motor in closed loop control |
writeAngularPosition | Rotate DC motor by specified angle in closed loop position control |
writeSpeed | Write speed of PID motor |
rotaryEncoder | Connection to rotary encoder on Arduino MKR Motor Carrier or Nano Motor Carrier |
readCount | Read current count value from encoder connected to MKR Motor Carrier or Nano Motor Carrier |
readSpeed | Read current rotational speed of motor from rotary encoder |
resetCount | Set encoder count value to zero or specified value |
servo | Connection to servo motor on Arduino MKR Motor Carrier or Nano Motor Carrier |
writePosition | Write position of servo motor connected to MKR Motor Carrier or Nano Motor Carrier |
도움말 항목
- Using Arduino Engineering Kit Rev 2 with Pre-Configured Projects in Support Package
Learn how to use Arduino® Engineering Kit Rev 2 with the support package.
추천 예제
Webcam Controlled Rover Using Arduino Engineering Kit Rev 2
Use Arduino® Engineering Kit Rev 2 to program a differential drive robot that can be remotely controlled by MATLAB® over Wi-Fi® to perform operations such as path following and moving objects with a forklift along with obstacle avoidance.
Drawing Robot Using Arduino Engineering Kit Rev 2
Use Arduino® Engineering Kit Rev 2 to build and program a robot that extracts line traces from an image and reproduces it as a drawing on a whiteboard. The project uses MATLAB® code to capture an image using a webcam, and then convert it into a set of motor commands using image processing techniques, which drive the robot across a whiteboard and reproduce the captured image as a drawing.
Self-Balancing Motorcycle Using Arduino Engineering Kit Rev 2
Use Arduino® Engineering Kit Rev 2 to build and program a motorcycle bot that self-balances and maneuvers by itself using a flywheel. The project models the motorcycle with the help of inverted pendulum dynamics and performs inertial sensing to balance the motorcycle by controlling the flywheel, located at the center of the motorcycle.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)