100)//pwm限幅 {  pwm=100; } if(pwm<-100) {  pwm=-100; } -IMDN开发者社群-imdn.cn"> 100)//pwm限幅 {  pwm=100; } if(pwm<-100) {  pwm=-100; }  - IMDN开发者社群-imdn.cn">
登录
首页 » c++ » XIAOZHILI

XIAOZHILI

于 2022-01-26 发布 文件大小:61.94 kB
0 89
下载积分: 2 下载次数: 1

代码说明:

/***************************************************************自平衡程序修改时间:2013.12.8***************************************************************/#include "main.h"#define position_max 6000  //位置最大值int j=0;int position=0;int k=0;int i=0;int speed1=0;int speed=0;int acc_y=0;int acc_z=0;int gyr_x=0;int receive=0;int pwm=0;float G_X=0,A_X=0;float gyro_angle=0;float balan_angle=0;float balan_angle1=0;float G_X1=0,A_X1=0,G_X2=0,G_X3=0,GXERRO=0;float erro[3]; int pwmneed=0;int pwmturn=0;void adjust(void);void judge(){  pwm=PID_control(erro[0],G_X)+PID_control_2(speed,position);  //pwm+=pwmneed;  if(pwm>100) //pwm限幅  {    pwm=100;  }  if(pwm

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • ProjectManager
    模拟项目管理系统,简单的c# wpf界面和功能。(Simulation project management system, a simple c# wpf interface and functionality.)
    2020-10-10 16:57:34下载
    积分:1
  • 一个用C#编写的多项对话框程序
    一个简单C#程序,描述了一个拥有多个子界面(多项式)的对话框程序的源代码,方便使用人员添加自己的代码实现工业化的上位机程序。一个c++版本已投入使用!
    2022-06-27 23:19:12下载
    积分:1
  • matlab
    基于matalab的信道自适应均衡技术研究(Matalab based channel adaptive equalization technology research)
    2013-08-28 21:56:05下载
    积分:1
  • ANO 匿名四轴飞控
    开源四轴飞控源码共享,来源于匿名
    2022-08-14 13:47:51下载
    积分:1
  • * The most important classes and components * The new features of Delphi 6...
    * The most important classes and components * The new features of Delphi 6 * Programming DLLs * Delphi and databases * Delphi and the internet * Developing components Addison-Wesley Nitty Gritty Programming Series provides the most important facts that you willneed to know to get up and running in new programming topics quickly and when you have becomeproficient you can use it as an on-going reference book for all the fundamentals. Divided into three sections, this book provides everything you need to know to startprogramming in Delphi 6. * Introduction -- all the main topics that you ll need to get working now. * Reference section -- all the necessary instructions and topics in one easy reference section so that you can refer back to the book again and again. * Practical tips and tricks -- find out how to put those important concepts into practice and get expert tips on how to improve your programming.-* The most important classes and components
    2022-01-22 07:45:12下载
    积分:1
  • TI foc control pmsm BLDC
    太阳能智能汇流箱600V单向电流/电压/功率监测
    2022-02-05 17:07:29下载
    积分:1
  • wavelet_packet11
    小波包分解与重构使用,最佳树使用方法。小波分析理论与MATLAB实现实例。很好的程序,希望对大家有用。(Wavelet packet decomposition and reconstruction using the best tree to use. MATLAB implementation of wavelet analysis theory and examples. Very good program, I hope all of us. )
    2021-04-18 20:28:51下载
    积分:1
  • 628089
    说明:  
    2018-05-23 10:32:57下载
    积分:1
  • MatlabCSharpSample
    C#与Matlab混合编程的例子,用两种方式实现!(C# and Matlab examples of mixed programming, implemented in two ways!)
    2011-07-06 13:00:37下载
    积分:1
  • GetInformation
    说明:  授权码由四部分计算而得:本机的计算机名称、CPUID、硬盘的序列号、网卡的MAC地址(Authorization code calculated by the four parts: the local computer name, CPUID, hard drive serial number, card)
    2008-09-26 16:01:30下载
    积分:1
  • 696516资源总数
  • 106442会员总数
  • 11今日下载