GithubHelp home page GithubHelp logo

motor-servo's Introduction

motor-servo

module

  • alpha parameter configure
    • alpha_setting.h
    • alpha_setting.c
  • alpha motion control
    • alpha_motion_control.h
    • alpha_motion_control.c
    • alpha_motion_test.c
  • encoder listening
    • am335x_setting.h
    • am335x_setting.c
  • console listening
    • cmdparser.h
    • cmdparser.c

API

API note
open_dev() 读取参数,确认配置
close_dev()
set_acce_time() (0.1ms)
set_dece_time() (0.1ms)
set_speed() (degree/s)
set_max_left_point() (degree)
set_max_right_point() (degree)
run_to_angle() (degree)
run_to_direction() left/right
cancel_task()
stop_run()
check() 开机检验
get_status() [角度][状态]

note:
1. 电机 - positions/circle 40000
2. 编码器 - positions/circle 65535
3. 转速比 - motor/encoder 252.5
4. 角度: %.3f(三位小数) 5. 状态: INP(or MAXL or MAXR) EOPE(operation error) LIMI(over limit)
6. 角度帧头: $ 帧尾 '\r'
7. 状态帧头: # 帧尾 '\r'

C99 Error

The timespec comes from POSIX, so you have to 'enable' POSIX definitions:

#if __STDC_VERSION__ >= 199901L  
#define _XOPEN_SOURCE 600  
#else  
#define _XOPEN_SOURCE 500  
#endif /* __STDC_VERSION__ */  

#include <time.h>
int main()
{
    struct timespec asdf;
    return 0;
}

For the warning: implicit declaration of function 'usleep':

gcc -std=gnu99

motor-client

the client for control the server

References

https://github.com/stephane/libmodbus
https://github.com/armink/EasyLogger
https://github.com/ndevilla/iniparser

motor-servo's People

Contributors

hengzz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

yisea123 lattic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.