hisyam fs
/
Test_servo
Ngetes
main.cpp
- Committer:
- hisyamfs
- Date:
- 2018-09-11
- Revision:
- 2:f07401343541
- Parent:
- 1:2759fc78aa04
File content as of revision 2:f07401343541:
#include "mbed.h" #include "AX12.h" Serial pc(USBTX, USBRX); int deg1 = 0; int deg2 = deg1+10; int id1 = 6; int id2 = 11; int kosong1, kosong2; int main() { AX12 servo1(PC_6, PC_7, PC_8, id1, 1000000); // tx, rx, tx_enable, servo ID, baud rate while (1) { servo1.SetGoal(240); pc.printf("test"); wait(0.5); servo1.SetGoal(150); wait(0.5); } }