Test probram to setup XBus servo settings.
Dependencies: ACM1602NI XBusServo mbed-src
This is just a working sample. This is setup tool for XBus servo. You can change all setting on XBus servo. Tested only on KL25Z
これはただの動作サンプルです。 これはXBusサーボ用のセットアップツールです。 このコードで、XBusサーボの全てのセッティングが変更できます。 KL25Z上でのみ動作確認しています。
main.cpp
- Committer:
- sawa
- Date:
- 2014-10-02
- Revision:
- 0:3e197b983b65
- Child:
- 1:4fdeb414f4ce
File content as of revision 0:3e197b983b65:
/* main.c file * * for testing mbed XBusServo.cpp * * Copyright (c) 2014-2014 JR PROPO * by Zak Sawa */ #include "mbed.h" //#include "I2CLCD.h" #include "XBusServo.h" //I2CLCD LCD(I2C_SDA, I2C_SCL); XBusServo XBus(PTD3, PTD2, 10); Ticker timer; void XbusIntervalHandler() { XBus.sendChannelDataPacket(); } int main() { uint16_t theValue = kXbusServoNeutral; XBus.addServo(0x01, kXbusServoNeutral); printf("added"); // timer.attach_us(&XbusIntervalHandler, kXBusInterval * 1000); // while(1) { // theValue += 10; // XBus.setServo(0x01, theValue); // } }