LEGO Robotic C Programming

所在平台: Udemy

课程主页: https://www.udemy.com/course/lego-robotic-c-programming/

课程评论:没有评论

第一个写评论        关注课程

课程简介

**课程名称:** LEGO 机器人 C 语言编程 **课程概述:** 本课程旨在教授您如何使用 C 语言来控制乐高机器人(而非 NXT 软件),引入更强大的 NXC 编码。您将学习 C 语言基础编程技能以及乐高机器人特有的函数,从而能够开发算法,让机器人实现自主导航、寻找敌人等功能。 **课程亮点:** * **打下坚实基础:** 为 C 语言初学者和硬件控制打下坚实基础,包括函数定义、参数使用、循环控制(while, repeat)、条件语句(if else)等。 * **软硬件结合:** 学习 C 语言代码如何通过输入/输出(I/O)端口与硬件交互,将代码编译成低级语言以读写硬件,从而控制机器人。 * **传感器交互:** 通过 I/O 接口,传感器可以将反馈信息传递回机器人处理器,学习如何根据传感器(如触碰传感器、超声波传感器)的反馈信息编写控制算法。 * **电机控制:** 掌握如何通过 C 语言控制机器人两个电机,实现基础的速度和方向控制,并引入 PID 控制器以提升响应速度,以及同步控制,确保机器人直线或曲线运动。 * **进阶功能:** 学习 PID 控制器实现精确控制,以及同步/异步控制,使机器人能够执行直线、圆形或曲线运动。 * **超越 NXT 软件:** 课程内容远超乐高自有的 NXT 软件,为您开启乐高机器人编程的全新乐趣世界。 **学习内容概览:** 1. **软件安装与使用:** 学习下载和使用 C 语言编译器,以及如何编译代码并下载到乐高机器人。 2. **基础编程:** 学习如何通过 C 语言向机器人屏幕发送消息,实现机器人运动(前进、后退、转向)和基本控制。 3. **传感器控制:** 利用触碰传感器和超声波传感器等,实现更复杂的机器人任务,例如在场地搜索并“攻击”敌人。 4. **高级控制:** 学习 PID 控制器和同步控制,实现精确的运动轨迹控制。 通过本课程,您将掌握强大的 C 语言编程技能,并将其应用于乐高机器人的控制,开启一个充满创造力和挑战的学习旅程。

课程评论(0条)

课程详情

Course DescriptionThe course teaches you how to use the C programming to control the LEGO Robot. It is not the NXT software but more cool NXC coding. You can learn the basic C coding skill and special function for the LEGO Robot. You can develop an algorithm to let your Robot auto pilot the field and find enemies.Build a strong foundation for beginner for the C coding and hardware control. Learn the function definition.How to use parameter.Loop control, while, repeat and If else.Hardware IO control.Advanced function like PID controller.Synchronize the two wheels.A powerful skill to learnC is the basic language for a lot of coding projects. It also share very similar grammar with all other advanced coding language. Through the classes, you could learn the C basic format and the essential functions like the while loop, if/else control. It open the door to beginner. The classes also teach how the C code connect to the hardware through the input/output (I/O) ports. After compiling, the C code could translate to lower level language to read and write the hardware IO and then control the Robot.Through the I/O interface, the sensor could send feedback information back to Robot processor. So you could write an algorithm to control the Robot based on what it sees.The two Robot motors are controlled by the I/O. You could learn how to control the motor from basic speed control and motor rotate control. A classic PID control could be implemented to speed up the response. A synchronous control could guide the Robot to move in a straight line or in a specified curve.Content and overviewFirst, you will learn how to download the software compiler and how to use it to compile the code and download to LEGO Robot.Second, you learn the basic coding to send a message to Robot screen. You can see how the computer talk to your Robot. By using basic function like repeat and while loop, if/else functions, you could move the Robot and make it turns.After learned the coding basic, you could use the coding to control the sensors like touch sensor and ultra sound sensor. Using the sensors allow you to control the Robot to achieve your tasks. I show you an example the Robot will search enemies in the filed and attack it.More complicated function will also be taught. The PID control will control the Robot precisely. The synchronous control will control the two wheel in phase or has a phase shift. By using the function, the Robot could move straight line or circle or a curve.All of these could be done using the coding. It reveals a new fun world for the LEGO Robot. It does much more than self contained NXT software.

课程标签

0人关注该课程

主题相关的课程