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 103
下载积分: 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 个回复

  • solve-equation
    matlab用来解一般线性或者非线性方程的方法及标准应用公式。(matlab used to solve a general linear or nonlinear equations and application of formulas.)
    2012-06-08 10:45:34下载
    积分:1
  • 仓库条码管理系统
    说明:  条码仓库管理系统,特别适合中小型超市,解决了库存、入库、出库、库存查询、数据报表等大量人工需要完成的事情,现在只需要轻轻的点几下鼠标就能完成,大量节约了人力和物力,实现了无纸化的操作,能把出库入库报表打印出来或导出为excel,更加直观和省时。(Bar code warehouse management system, especially suitable for small and medium-sized supermarkets, has solved a large number of manual tasks such as inventory, warehousing, warehousing, inventory query, data report forms and so on. Now it can be accomplished with a few clicks of the mouse. It saves a lot of manpower and material resources, realizes paperless operation, and can print out or export the warehouse report forms into excel, which is more intuitive and more intuitive. Time saving.)
    2019-03-21 17:22:13下载
    积分:1
  • time-series
    说明:  用MATLAB完整的时间序列预测模型,适合多种方法(With a complete MATLAB time series forecasting model, suitable for a variety of methods)
    2010-03-20 07:29:23下载
    积分:1
  • dlinna_okruzhnosti_pi
    This is programm solved cicle with PI number
    2020-06-18 12:00:02下载
    积分:1
  • PIL--FFT-DSK6713
    contains some example on using PIL in Simulink with CCS and DSK6713
    2012-04-28 21:47:21下载
    积分:1
  • Encodercodes
    加密解密(Encoder)C#源代码 v1.0 加密解密(Encoder),实现MD5加密,DES加密解密,RSA加密解密。使用的是System.Security.Cryptography 命名空间提供的相关类(Encryption and decryption (Encoder) C# source code v1.0 Encryption and decryption (Encoder), achieve MD5 encryption, DES encryption and decryption, RSA encryption and decryption. Using System.Security.Cryptography namespace provides related classes)
    2015-11-15 09:11:05下载
    积分:1
  • 嵌入式wince自动软件升级
    这是本人公司项目做的软件自动升级程序。在些嵌入式设备产品中软件升级是很麻烦的,本源码程序提供了个非常方便的软件升级方法,使得购买你的产品的用户升级软件非常之方便且快,不用打开机壳,只需插入带升级软件的U盘,就可自动升级并开始运行新的软件,提升产品的性价比。
    2022-04-30 20:39:38下载
    积分:1
  • attachments_2010_12_14
    System will automatically delete the directory of debug and release, so please do not put files on these two directory.
    2011-05-25 00:16:53下载
    积分:1
  • I2c
    arduino库函数有关I2C的库函数I2C模块使用教程(arduino I2C library function library function I2C module using tutorial)
    2018-06-26 17:12:54下载
    积分:1
  • STM32网口IAP下载程序源码
    STM32网口IAP下载程序源码,可用于STM32系列产品通过网口实现系统更新功能,还是很有参考价值的。
    2022-03-09 16:28:01下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载