Servo Motor Kutuphanesi(Library)
Dependents: RTOS_servo_motor step_servo_potile_motor thread_servo_led
servo.cpp
- Committer:
- marvas
- Date:
- 2019-12-21
- Revision:
- 1:d9dc08980d89
- Parent:
- 0:a693d4a007d6
File content as of revision 1:d9dc08980d89:
#include "servo.h" /* Copyright (c) Kutuphaneyi yazan(Author): Egitimci/Yazar - Mehmet Akif ARVAS Yazarin Kitaplari: Arm islemci Programlama - Seckin Yayincilik Buy(Satın alma linki): https://www.seckin.com.tr/kitap/926844928 Arduino ile robotik programlama - Seckin Yayincilik Buy(Satın alma linki): https://www.seckin.com.tr/kitap/469991743 twitter: @arvasmehmetakif instagram: @arvasmehmetakif */ servo::servo(PinName pa) : sinyalpini(pa) {} int servo::derece(int deger) { int a=600+deger*9; for(uint8_t x=0;x<20;x++) { sinyalpini=1; wait_us(a); sinyalpini=0; wait_us(20000-a); } return 0; }