首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

garbage_classification_achen (2).zip

行业研究 84.72KB 17 需要积分: 1
立即下载

资源介绍:

garbage_classification_achen (2).zip
/****************************************************** * FileName: LobotServoController.cpp ** Company: 乐幻索尔 * Date: 2016/07/02 16:53 * Description: Lobot舵机控制板二次开发库,本文件包含 了此库的具体实现 *****************************************************/ #include "LobotServoController.h" #define GET_LOW_BYTE(A) (uint8_t)((A)) //宏函数 获得A的低八位 #define GET_HIGH_BYTE(A) (uint8_t)((A) >> 8) //宏函数 获得A的高八位 #define BYTE_TO_HW(A, B) ((((uint16_t)(A)) << 8) | (uint8_t)(B)) //宏函数 以A为高八位 B为低八位 合并为16位整形 LobotServoController::LobotServoController() { //初始化运行中动作组号为0xFF,运行次数为0,运行中标识为假,电池电压为0 numOfActinGroupRunning = 0xFF; actionGroupRunTimes = 0; isRunning = false; batteryVoltage = 0; #if defined(__AVR_ATmega32U4__) //for Arduino Leonardo,Micro.... SerialX = &Serial1; #else SerialX = &Serial; #endif } LobotServoController::LobotServoController(HardwareSerial &A) { LobotServoController(); SerialX = &A; } LobotServoController::~LobotServoController() { } /********************************************************************************* * Function: moveServo * Description: 控制单个舵机转动 * Parameters: sevoID:舵机ID,Position:目标位置,Time:转动时间 舵机ID取值:0<=舵机ID<=31,Time取值: Time > 0 * Return: 无返回 * Others: **********************************************************************************/ void LobotServoController::moveServo(uint8_t servoID, uint16_t Position, uint16_t Time) { uint8_t buf[11]; if (servoID > 31 || !(Time > 0)) { //舵机ID不能打于31,可根据对应控制板修改 return; } buf[0] = FRAME_HEADER; //填充帧头 buf[1] = FRAME_HEADER; buf[2] = 8; //数据长度=要控制舵机数*3+5,此处=1*3+5 buf[3] = CMD_SERVO_MOVE; //填充舵机移动指令 buf[4] = 1; //要控制的舵机个数 buf[5] = GET_LOW_BYTE(Time); //填充时间的低八位 buf[6] = GET_HIGH_BYTE(Time); //填充时间的高八位 buf[7] = servoID; //舵机ID buf[8] = GET_LOW_BYTE(Position); //填充目标位置的低八位 buf[9] = GET_HIGH_BYTE(Position); //填充目标位置的高八位 SerialX->write(buf, 10); } /********************************************************************************* * Function: moveServos * Description: 控制多个舵机转动 * Parameters: servos[]:舵机结体数组,Num:舵机个数,Time:转动时间 0 < Num <= 32,Time > 0 * Return: 无返回 * Others: **********************************************************************************/ void LobotServoController::moveServos(LobotServo servos[], uint8_t Num, uint16_t Time) { uint8_t buf[103]; //建立缓存 if (Num < 1 || Num > 32 || !(Time > 0)) { return; //舵机数不能为零和大与32,时间不能为零 } buf[0] = FRAME_HEADER; //填充帧头 buf[1] = FRAME_HEADER; buf[2] = Num * 3 + 5; //数据长度 = 要控制舵机数*3+5 buf[3] = CMD_SERVO_MOVE; //填充舵机移动指令 buf[4] = Num; //要控制的舵机个数 buf[5] = GET_LOW_BYTE(Time); //取得时间的低八位 buf[6] = GET_HIGH_BYTE(Time); //取得时间的高八位 uint8_t index = 7; for (uint8_t i = 0; i < Num; i++) { //循环填充舵机ID和对应目标位置 buf[index++] = servos[i].ID; //填充舵机ID buf[index++] = GET_LOW_BYTE(servos[i].Position); //填充目标位置低八位 buf[index++] = GET_HIGH_BYTE(servos[i].Position);//填充目标位置高八位 } SerialX->write(buf, buf[2] + 2); //发送帧,长度为数据长度+两个字节的帧头 } /********************************************************************************* * Function: moveServos * Description: 控制多个舵机转动 * Parameters: Num:舵机个数,Time:转动时间,...:舵机ID,转动角,舵机ID,转动角度 如此类推 * Return: 无返回 * Others: **********************************************************************************/ void LobotServoController::moveServos(uint8_t Num, uint16_t Time, ...) { uint8_t buf[128]; va_list arg_ptr = NULL; va_start(arg_ptr, Time); //取得可变参数首地址 if (Num < 1 || Num > 32 || (!(Time > 0)) || arg_ptr == NULL) { return; //舵机数不能为零和大与32,时间不能为零,可变参数不能为空 } buf[0] = FRAME_HEADER; //填充帧头 buf[1] = FRAME_HEADER; buf[2] = Num * 3 + 5; //数据长度 = 要控制舵机数 * 3 + 5 buf[3] = CMD_SERVO_MOVE; //舵机移动指令 buf[4] = Num; //要控制舵机数 buf[5] = GET_LOW_BYTE(Time); //取得时间的低八位 buf[6] = GET_HIGH_BYTE(Time); //取得时间的高八位 uint8_t index = 7; for (uint8_t i = 0; i < Num; i++) { //从可变参数中取得并循环填充舵机ID和对应目标位置 uint16_t tmp = va_arg(arg_ptr, uint16_t); //可参数中取得舵机ID buf[index++] = GET_LOW_BYTE(tmp); //貌似avrgcc中可变参数整形都是十六位 //再取其低八位 uint16_t pos = va_arg(arg_ptr, uint16_t); //可变参数中取得对应目标位置 buf[index++] = GET_LOW_BYTE(pos); //填充目标位置低八位 buf[index++] = GET_HIGH_BYTE(pos); //填充目标位置高八位 } va_end(arg_ptr); //置空arg_ptr SerialX->write(buf, buf[2] + 2); //发送帧 } /********************************************************************************* * Function: runActionGroup * Description: 运行指定动作组 * Parameters: NumOfAction:动作组序号, Times:执行次数 * Return: 无返回 * Others: Times = 0 时无限循环 **********************************************************************************/ void LobotServoController::runActionGroup(uint8_t numOfAction, uint16_t Times) { uint8_t buf[7]; buf[0] = FRAME_HEADER; //填充帧头 buf[1] = FRAME_HEADER; buf[2] = 5; //数据长度,数据帧除帧头部分数据字节数,此命令固定为5 buf[3] = CMD_ACTION_GROUP_RUN; //填充运行动作组命令 buf[4] = numOfAction; //填充要运行的动作组号 buf[5] = GET_LOW_BYTE(Times); //取得要运行次数的低八位 buf[6] = GET_HIGH_BYTE(Times); //取得要运行次数的高八位 SerialX->write(buf, 7); //发送数据帧 } /********************************************************************************* * Function: stopActiongGroup * Description: 停止动作组运行 * Parameters: Speed: 目标速度 * Return: 无返回 * Others: **********************************************************************************/ void LobotServoController::stopActionGroup(void) { uint8_t buf[4]; buf[0] = FRAME_HEADER; //填充帧头 buf[1] = FRAME_HEADER; buf[2] = 2; //数据长度,数据帧除帧头部分数据字节数,此命令固定为2 buf[3] = CMD_ACTION_GROUP_STOP; //填充停止运行动作组命令 SerialX->write(buf, 4); //发送数据帧 } /********************************************************************************* * Function: setActionGroupSpeed * Description: 设定指定动作组的运行速度 * Parameters: NumOfAction: 动作组序号 , Speed:目标速度 * Return: 无返回 * Others: **********************************************************************************/ void LobotServoController::setActionGroupSpeed(uint8_t numOfAction, uint16_t Speed) { uint8_t buf[7]; buf[0] = FRAME_HEADER; //填充帧头 buf[1] = FRAME_HEADER; buf[2] = 5; //数据�

资源文件列表:

garbage_classification_achen (2).zip 大约有105个文件
  1. garbage_classification_achen/
  2. garbage_classification_achen/.git/
  3. garbage_classification_achen/.git/COMMIT_EDITMSG 21B
  4. garbage_classification_achen/.git/config 130B
  5. garbage_classification_achen/.git/description 73B
  6. garbage_classification_achen/.git/HEAD 23B
  7. garbage_classification_achen/.git/hooks/
  8. garbage_classification_achen/.git/hooks/applypatch-msg.sample 478B
  9. garbage_classification_achen/.git/hooks/commit-msg.sample 896B
  10. garbage_classification_achen/.git/hooks/fsmonitor-watchman.sample 4.62KB
  11. garbage_classification_achen/.git/hooks/post-update.sample 189B
  12. garbage_classification_achen/.git/hooks/pre-applypatch.sample 424B
  13. garbage_classification_achen/.git/hooks/pre-commit.sample 1.61KB
  14. garbage_classification_achen/.git/hooks/pre-merge-commit.sample 416B
  15. garbage_classification_achen/.git/hooks/pre-push.sample 1.34KB
  16. garbage_classification_achen/.git/hooks/pre-rebase.sample 4.78KB
  17. garbage_classification_achen/.git/hooks/pre-receive.sample 544B
  18. garbage_classification_achen/.git/hooks/prepare-commit-msg.sample 1.46KB
  19. garbage_classification_achen/.git/hooks/push-to-checkout.sample 2.72KB
  20. garbage_classification_achen/.git/hooks/sendemail-validate.sample 2.25KB
  21. garbage_classification_achen/.git/hooks/update.sample 3.56KB
  22. garbage_classification_achen/.git/index 1.03KB
  23. garbage_classification_achen/.git/info/
  24. garbage_classification_achen/.git/info/exclude 240B
  25. garbage_classification_achen/.git/logs/
  26. garbage_classification_achen/.git/logs/HEAD 594B
  27. garbage_classification_achen/.git/logs/refs/
  28. garbage_classification_achen/.git/logs/refs/heads/
  29. garbage_classification_achen/.git/logs/refs/heads/master 594B
  30. garbage_classification_achen/.git/objects/
  31. garbage_classification_achen/.git/objects/0f/
  32. garbage_classification_achen/.git/objects/0f/c6ed4aac7465021f33a1ae13a31f28bd453bee 1.69KB
  33. garbage_classification_achen/.git/objects/10/
  34. garbage_classification_achen/.git/objects/10/b9d8f00628700cb569d6b5188df13e3b5f4f89 167B
  35. garbage_classification_achen/.git/objects/1f/
  36. garbage_classification_achen/.git/objects/1f/30a6a34f5819094896e386487b751178368a5e 292B
  37. garbage_classification_achen/.git/objects/26/
  38. garbage_classification_achen/.git/objects/26/0212bf1f238d3df3ecbab3857b659ebd888425 408B
  39. garbage_classification_achen/.git/objects/2a/
  40. garbage_classification_achen/.git/objects/2a/6f0220e5f49950fe4683ca7b23e74ed4ba4cf9 217B
  41. garbage_classification_achen/.git/objects/2b/
  42. garbage_classification_achen/.git/objects/2b/919940de54e2e3175ff63027ffd2b5f2993e93 938B
  43. garbage_classification_achen/.git/objects/2e/
  44. garbage_classification_achen/.git/objects/2e/0bc4537bf7f0ef3979f16eb9ab90b3612ab1b7 172B
  45. garbage_classification_achen/.git/objects/3a/
  46. garbage_classification_achen/.git/objects/3a/e964466aa0b0dc69ef57d6d7183625efbeae6f 1.7KB
  47. garbage_classification_achen/.git/objects/51/
  48. garbage_classification_achen/.git/objects/51/9cc5fa1fbedcba12e07e743cb3fbf07f9f04fd 428B
  49. garbage_classification_achen/.git/objects/5b/
  50. garbage_classification_achen/.git/objects/5b/167384797020aade8cc5a7299e69d6f263a77a 744B
  51. garbage_classification_achen/.git/objects/6e/
  52. garbage_classification_achen/.git/objects/6e/834f83a795d8b2632c65f6c558f8d178747d4f 4.92KB
  53. garbage_classification_achen/.git/objects/74/
  54. garbage_classification_achen/.git/objects/74/45a3e10354345edc40dfcf4842842cc56b41a9 817B
  55. garbage_classification_achen/.git/objects/7c/
  56. garbage_classification_achen/.git/objects/7c/9c9d3e66cdc5978b5ac3827a253fc9d69cd078 428B
  57. garbage_classification_achen/.git/objects/7c/a2e836ac82ac11049c5e2f5921e3158fd5d98b 1.84KB
  58. garbage_classification_achen/.git/objects/7d/
  59. garbage_classification_achen/.git/objects/7d/9bd0ff8214399d12086ae85dc6cb7f4af2aeab 543B
  60. garbage_classification_achen/.git/objects/87/
  61. garbage_classification_achen/.git/objects/87/81873f16055e3ba119a3ad2ab1cd109f51ec6d 1.28KB
  62. garbage_classification_achen/.git/objects/8e/
  63. garbage_classification_achen/.git/objects/8e/58adaad17b045258f191ba464d0b5d76734fff 600B
  64. garbage_classification_achen/.git/objects/8e/ddfe09bfc271f840accb2a82f6440d534f3eb7 2.99KB
  65. garbage_classification_achen/.git/objects/a0/
  66. garbage_classification_achen/.git/objects/a0/0e71fc44ac6a33449c20ad0e1d2480d0156ddf 411B
  67. garbage_classification_achen/.git/objects/b3/
  68. garbage_classification_achen/.git/objects/b3/5fbc5de8cd8526f4c1d6eaf2c4ea05d06c21f2 630B
  69. garbage_classification_achen/.git/objects/b3/baebba6179754aa506af3d415fee91d4e67f6b 1.41KB
  70. garbage_classification_achen/.git/objects/b5/
  71. garbage_classification_achen/.git/objects/b5/04d9587c7c1b59024fda933bd929e86342f482 169B
  72. garbage_classification_achen/.git/objects/ba/
  73. garbage_classification_achen/.git/objects/ba/4eb4926b2862a261c3981858abd99373084943 293B
  74. garbage_classification_achen/.git/objects/c5/
  75. garbage_classification_achen/.git/objects/c5/49ec9dd643caf07d6d9b26996e44907555cf6b 4.74KB
  76. garbage_classification_achen/.git/objects/c7/
  77. garbage_classification_achen/.git/objects/c7/cf2d2cd570cb2d7410f7cb5cd28bf11c5ed50f 744B
  78. garbage_classification_achen/.git/objects/d7/
  79. garbage_classification_achen/.git/objects/d7/90a27c43941ac46689e557ffdbf4c0ccfa377b 514B
  80. garbage_classification_achen/.git/objects/e6/
  81. garbage_classification_achen/.git/objects/e6/7bbaee9ac67ecfb5324cba6a4aa53717a44ca9 407B
  82. garbage_classification_achen/.git/objects/e9/
  83. garbage_classification_achen/.git/objects/e9/39432cc9a5f926e7935fda086f1a8a042d74cc 137B
  84. garbage_classification_achen/.git/objects/f2/
  85. garbage_classification_achen/.git/objects/f2/1a1f798f1f93ac8a4102b8649d39092a514898 287B
  86. garbage_classification_achen/.git/objects/fb/
  87. garbage_classification_achen/.git/objects/fb/405a0aade90c748f6c8e04e78eebcfd35eba38 455B
  88. garbage_classification_achen/.git/objects/info/
  89. garbage_classification_achen/.git/objects/pack/
  90. garbage_classification_achen/.git/refs/
  91. garbage_classification_achen/.git/refs/heads/
  92. garbage_classification_achen/.git/refs/heads/master 41B
  93. garbage_classification_achen/.git/refs/tags/
  94. garbage_classification_achen/action_control.ino 4.12KB
  95. garbage_classification_achen/Arduino_UART_CMDw.ino 19.7KB
  96. garbage_classification_achen/def.h 851B
  97. garbage_classification_achen/garbage_classification_achen.ino 7.69KB
  98. garbage_classification_achen/LobotServoController.cpp 11.2KB
  99. garbage_classification_achen/LobotServoController.h 2.06KB
  100. garbage_classification_achen/PositionXY.ino 376B
  101. garbage_classification_achen/Step.cpp 1.88KB
  102. garbage_classification_achen/Step.h 532B
  103. garbage_classification_achen/UartStep.cpp 3.63KB
  104. garbage_classification_achen/UartStep.h 708B
  105. garbage_classification_achen/Uart_POS_XY.ino 1.16KB
0评论
提交 加载更多评论
其他资源 ClickHouse 旧版驱动压缩包
ru.yandex.clickhouse.ClickHouseDriver 旧版驱动压缩包
sqoop1.4.7压缩包
sqoop1.4.7压缩包
springboot农产品扶贫助农网站00821
近年来,电子商务的快速发展引起了行业和学术界的高度关注。湖北地区农产品扶贫助农网站旨在为用户提供一个简单、高效、便捷的购物体验,它不仅要求用户清晰地查看所需信息,而且还要求界面设计精美,使得功能与页面完美融合,从而提升系统的可操作性。因此,我们需要深入研究信息内容,并利用技术手段来完善湖北地区农产品扶贫助农网站的设计与实现。 首先,论文分析了农产品扶贫助农网站的设计与实现的需求和功能,包括前台的首页、通知公告、农产资讯、商城中心、商城管理、个人中心和后台的系统用户、贫困申请管理、系统管理、通知公告管理、资源管理、商城管理等。该系统旨在提供一个便捷的在线平台,供用户购买扶贫助农的农产品。然后,系统采用Java作为主要开发语言,使用MySQL数据库进行数据存储,并结合前端技术实现了用户界面的设计。通过该系统,用户可以浏览农产品信息、下单购买、管理个人订单、地址等功能。本文详细描述了系统的功能需求、数据库设计、系统架构和主要模块的实现过程。通过测试和验证,该系统达到了预期的目标,为扶贫助农的农产品线上销售提供了有效的支持。
springboot农产品扶贫助农网站00821 springboot农产品扶贫助农网站00821 springboot农产品扶贫助农网站00821
springboot电影院售票与管理系统011449
前台用户的功能如下: 登录:根据账号密码进行登录操作。 维护个人信息:用户因个人信息的变更可以随时修改自己注册信息。 浏览影片信息:用户可以根据电影类型浏览影片的信息,并选中某个影片查看详情,例如:影片编号、影片名称、影片类型、影院名称、上映时间、票价等。 浏览影院信息:用户可以根据电影类型浏览影院的信息,并选中某个影院查看详情,例如:影院编号、影院名称、影院地址、影院电话等。 浏览评论信息:选中某间电影可查看其用户的评论。 评论:用户可以根据自己的观点看法对相关电影进行评论。 管理员功能如下: 修改密码:管理员可以随时修改自己进入系统的登录密码,以保证系统的安全性。 对购票单信息进行处理:办理购票单审核等。 管理普通管理员:对普通管理员进行管理。调动相关工作人员时可以添加或删除普通管理员。 影院信息管理:对影院信息进行维护,添加、删除、修改信息。 对退票记录信息进行处理:办理退票审核等。 影片信息管理:对影片信息进行维护,添加、删除、修改信息。 评论信息管理:可以查看用户的评论,及时了解用户发起的建议。 用户管理:可以查看注册用户的信息,并对其进行管理。
小R照妖镜V5.1.0赞助版.zip
小R照妖镜V5.1.0赞助版.zip
文件批量重命名V1.0
文件批量重命名V1.0 程序 操作方法: 1.点击 [选择目录]按钮 选择要批量任务的目录 2.点击 [查看目录内的文件]按钮 查看目录内文件名 3.在 [旧字符串] 一栏中输入文件名中需要改变的字符串 4.在 [新字符串] 一栏中输入文件名中被改变之后的字符串 5.点击 [开始批量重命名] 文件进行批量重命名任务 提示: 操作之前请自行备份文件,以免重命名错误! 功能用途: a.主要用于音乐视频专辑的批量重命名,也可批量重命名文档! b.可以复制打印的文件列表到文本(文本框支持CTRL+A | CTRL + S)! c.更多功能可以自己研究 -作者持续更新功能,关注作者CSND博客获取更新-
QtHelloWorld.zip
Qt Hello World
ssm828基于java的珠宝购物网站系统的建设
ssm828基于java的珠宝购物网站系统的建设