精华内容
下载资源
问答
  • STM32舵机控制程序

    2020-09-13 15:00:16
    基于火星人开发板自编的STM32舵机控制程序。 基于火星人开发板自编的STM32舵机控制程序。 基于火星人开发板自编的STM32舵机控制程序。 基于火星人开发板自编的STM32舵机控制程序
  • 舵机控制程序

    2013-05-04 10:31:45
    这是51芯片控制两个舵机的一个中断程序控制舵机张角的是PWM波我知道,这里面中断时间设置为20ms,那我只要控制P2_2,P2_1这两个引脚高电平时间就可以控制张角了是吗?为什么P2-1拉低后还要有个延时才拉低P2-2?麻烦...
  • 基于FPGA的舵机控制程序.rar
  • 多路舵机控制程序

    2019-07-25 12:26:41
    多路舵机控制程序 舵机程序控制 (TIM4四个通道) void TIM4_PWM_Init(u16 arr,u16 psc) { GPIO_InitTypeDef GPIO_InitStructure; TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; TIM_OCInitTypeDef TIM_...

    多路舵机控制程序
    舵机程序控制 (TIM4四个通道)
    void TIM4_PWM_Init(u16 arr,u16 psc)
    {
    GPIO_InitTypeDef GPIO_InitStructure;
    TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
    TIM_OCInitTypeDef TIM_OCInitStructure;

    RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4, ENABLE);	//使能定时器4时钟
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);  //使能GPIO外设和AFIO复用功能模块时钟
    

    //设置该引脚为复用输出功能,输出TIM4 CH2的PWM脉冲波形 GPIOB.6789
    GPIO_InitStructure.GPIO_Pin=GPIO_Pin_7|GPIO_Pin_8|GPIO_Pin_9|GPIO_Pin_6;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //复用推挽输出
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
    GPIO_Init(GPIOB, &GPIO_InitStructure);//初始化GPIO

    //初始化TIM4
    TIM_TimeBaseStructure.TIM_Period = arr; //设置在下一个更新事件装入活动的自动重装载寄存器周期的值
    TIM_TimeBaseStructure.TIM_Prescaler =psc; //设置用来作为TIMx时钟频率除数的预分频值
    TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1; //设置时钟分割:TDTS = Tck_tim
    TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; //TIM向上计数模式
    TIM_TimeBaseInit(TIM4, &TIM_TimeBaseStructure); //根据TIM_TimeBaseInitStruct中指定的参数初始化TIMx的时间基数单位

    //初始化TIM4 Channel2 PWM模式	 
    TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM2; //选择定时器模式:TIM脉冲宽度调制模式2
    TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable; //比较输出使能
    TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High; //输出极性:TIM输出比较极性高
    TIM_OC2Init(TIM4, &TIM_OCInitStructure);  //根据T指定的参数初始化外设TIM4 OC2
    
    TIM_OC2PreloadConfig(TIM4, TIM_OCPreload_Enable);  //使能TIM4在CCR2上的预装载寄存器
    

    //初始化TIM4 Channel1 PWM模式
    TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM2; //选择定时器模式:TIM脉冲宽度调制模式2
    TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable; //比较输出使能
    TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High; //输出极性:TIM输出比较极性高
    TIM_OC1Init(TIM4, &TIM_OCInitStructure); //根据T指定的参数初始化外设TIM4 OC1

    TIM_OC1PreloadConfig(TIM4, TIM_OCPreload_Enable);  //使能TIM4在CCR1上的预装载寄存器0
    

    //初始化TIM4 Channel3 PWM模式
    TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM2; //选择定时器模式:TIM脉冲宽度调制模式2
    TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable; //比较输出使能
    TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High; //输出极性:TIM输出比较极性高
    TIM_OC3Init(TIM4, &TIM_OCInitStructure); //根据T指定的参数初始化外设TIM4 OC3

    TIM_OC3PreloadConfig(TIM4, TIM_OCPreload_Enable);  //使能TIM4在CCR3上的预装载寄存器
    

    //初始化TIM4 Channel4 PWM模式
    TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM2; //选择定时器模式:TIM脉冲宽度调制模式2
    TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable; //比较输出使能
    TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High; //输出极性:TIM输出比较极性高
    TIM_OC4Init(TIM4, &TIM_OCInitStructure); //根据T指定的参数初始化外设TIM4 OC4

    TIM_OC4PreloadConfig(TIM4, TIM_OCPreload_Enable);  //使能TIM4在CCR4上的预装载寄存器
    
    TIM_Cmd(TIM4, ENABLE);  //使能TIM4
    

    一个舵机实现转动,哪个型号的舵机就不说了,大家自己去学习咋改吧。
    main.c
    #include “led.h”
    #include “delay.h”
    #include “key.h”
    #include “sys.h”
    #include “usart.h”
    #include “timer.h”

    占空比与运行角度的关系
    0.5ms--------------0度;
    1.0ms------------45度;
    1.5ms------------90度;
    2.0ms-----------135度;
    2.5ms-----------180度;

    int main(void)
    {
    delay_init(); //延时函数初始化
    NVIC_Configuration(); //设置NVIC中断分组2:2位抢占优先级,2位响应优先级
    uart_init(9600); //串口初始化为9600
    TIM4_PWM_Init(1999,719); //PWM频率=72000000/(719+1)/(1999+1)=50hz=20mS
    while(1)
    {
    delay_ms(1000);
    TIM_SetCompare1(TIM4,1750);//占空比 (2000-1750)/2000 * 20mS=2.5mS
    delay_ms(1000);
    TIM_SetCompare1(TIM4,1800);//占空比 (2000-1800)/2000 * 20mS=2mS
    delay_ms(1000);
    TIM_SetCompare1(TIM4,1850);//占空比 (2000-1850)/2000 * 20mS=1.5mS
    delay_ms(1000);
    TIM_SetCompare1(TIM4,1900);//占空比 (2000-1900)/2000 * 20mS=1mS
    delay_ms(1000);
    TIM_SetCompare1(TIM4,1945); //占空比 (2000-1950)/2000 * 20mS=0.5mS
    //1950时会有抖动,说明舵机没有到制定点,但是却卡主了,减小此值可解决此问题
    }
    }
    最近做比赛,刚编程的,若果大家发现了什么错误或者更优项,请在下面回复,望各位不吝赐教!

    展开全文
  • 使用STM32F103系列单片机控制舵机程序,直接接入到单片机中,使用PWM波控制
  • 舵机控制程序.zip

    2019-08-09 14:31:15
    可完美控制舵机,设置多个pwm输出口,可控制多个舵机。在使用时舵机要和单片机共地。
  • sg90舵机控制程序

    2018-08-08 11:24:04
    由于代码缺少头文件里的数据,所以还需要下载stc12的头文件数据库,并添加至常用的reg51.h库里边
  • 原本PCA9685的英文数据手册看的头疼,这里直接就给STC89的PCA9685控制四个舵机程序,拥有足够方便的库,并且可以用三个IO口一次性控制16个舵机,总之就是非常的好玩。
  • 51单片机舵机控制程序

    热门讨论 2011-10-18 18:44:28
    程序是实现运用51单片机控制舵机程序!!!
  • stm32f407舵机控制程序

    2018-08-03 16:24:50
    stm32f407的舵机控制,角度范围为0-180度,可通过按键来改变pwm占空比,进而对舵机转动角度进行控制。也可以自行设置转动角度,附带计算公式
  • cds5516舵机控制程序 执行摘要 (Executive Summary) CDS for Apps VS Power Query – is there a difference? If so, what is that difference? Are they mutually exclusive or complement each other? Later I ...

    cds5516舵机控制程序

    执行摘要 (Executive Summary)

    CDS for Apps VS Power Query – is there a difference? If so, what is that difference? Are they mutually exclusive or complement each other? Later I briefly outline Common Data Services for Analytics no, Power BI Datapools no again, actually Power BI Data Flows. It is difficult to keep up with the correct naming.

    CDS for Apps VS Power Query –有区别吗? 如果是这样,那有什么区别? 它们是互斥的还是互补的? 稍后,我简要概述通用Analytics for Data Services,而不是Power BI Datapool ,实际上是Power BI Data Flows 。 难以跟上正确的命名。

    What I have put together is my impression based on my experience and research from the perspective of a backend data person with a developer background. I try not to draw too direct conclusions so please treat it as what it is at this point: a technical opinion (and not an expert’s testimonial).

    我的总结是基于我的经验和从具有开发人员背景的后端数据人员的角度进行的研究。 我尽量不要得出太直接的结论,因此请按目前情况将其视为:技术意见(而非专家的推荐)。

    In short: my understanding is that CDS for Apps is a subset of Power Query functionality packaged together, something similar to how a SQL Server stored procedure is an abstraction layer of a bunch of T-SQL statements. The same applies to CDS for Apps, you don’t need to understand all the subtleties behind CDS for Apps, it’s like an M stored procedure (that includes connectors in my view though it is not the case in the official documentation).

    简而言之:我的理解是CDS for Apps是打包在一起的Power Query功能的子集,类似于SQL Server存储过程是一堆T-SQL语句的抽象层的方式。 同样适用于CDS for Apps,您无需了解CDS for Apps的所有细微之处,就像一个M存储过程( 在我看来,它包括连接器,尽管官方文档中并非如此 )。

    So even without CDS for Apps, we can use all that it offers and even more on the backend side, assuming at least one of the dev team can code M queries (Microsoft plans to introduce M into SSIS/ADF, too so it can be used in enterprise level data load processes, too!).

    For some more details, please read on!

    因此,即使没有CDS for Apps,我们也可以使用其提供的所有功能,甚至可以在后端使用更多功能,前提是至少有一个开发团队可以编写M个查询(微软也计划将M引入SSIS / ADF中,以便也用于企业级数据加载过程!)。

    有关更多详细信息,请继续阅读!

    背景 (Background)

    Recently I had a chance (thanks to a colleague who came to me with a question) to experiment a little bit with Power Query.

    最近,我有机会(感谢一个向我提出问题的同事)对Power Query进行了一些实验。

    With all things, Power (true to this one, too) lines become blurry regarding the target audience or the targeted userbase. You hear about a Power [Something], labeled as “self-service” and initially, you (certainly true for me) don’t really know how the pieces fit together and how it is integrated into Microsoft’s enterprise level product roadmap.

    总而言之,关于目标受众或目标用户群, Power (也适用于此)内容变得模糊。 您听说过被标记为“自助服务”的Power [Something],起初,您( 对我当然是真的 )并不真正了解各个部分如何组合以及如何将其集成到Microsoft的企业级产品路线图中。

    My purpose is to share what I have learned in a brief period of time to help you avoid the confusion and misunderstandings that I had about these things. Given my background, I mostly see things from the BI developer’s (if there is still such a thing, please put your own designation here: data engineer, analytical specialist, etc) perspective, so when I write I or we, it is always from that viewpoint. However, being a consultant means I try to consider technical solutions from a wider perspective from two angles:

    我的目的是分享我在短时间内学到的知识,以帮助您避免我对这些事情所产生的困惑和误解。 在我的背景下,我通常会从BI开发人员的角度来看事情( 如果还有这样的事情,请在此处输入您自己的称呼:数据工程师,分析专家等 ),所以当我写我或我们的时候,总是那个观点。 但是,作为顾问意味着我试图从两个角度从更广泛的角度考虑技术解决方案:

    • How would management/stakeholders understand the capabilities of a new tool (or a new version of a tool)? – this often drives future tech-investments and has a significant impact on projects

      管理层/涉众如何理解新工具(或工具的新版本)的功能? –这通常会推动未来的技术投资,并对项目产生重大影响
    • How could end users (on any level) deal with the new tool/version? – this obviously impacts support and its structure

      最终用户(任何级别)如何处理新工具/版本? –这显然会影响支持及其结构

    I openly admit that I don’t have a clear picture when it comes to Microsoft’s Power [Something] strategy and roadmap. Bits of news fly around all the time and the scene changes very often. What I write below is my impression and I try not to draw too direct conclusions so please treat it what it is at this point: a technical opinion (and not an expert’s testimonial).

    我公开承认,对于Microsoft的Power [Something]策略和路线图,我并没有清楚的了解。 几乎所有时间都散布着很多新闻,而且场景经常变化。 我在下面写的是我的印象,我尽量不得出太直接的结论,因此请在此时将其视为: 技术意见 (而不是专家的推荐)。

    应用程序CDS (CDS for Apps)

    I keep hearing about CDS for Apps and how awesome it is, and that we just need to wait for a little as it’s not ready yet or not released with all its features.

    我一直在听关于Apps的CDS以及它的强大程度,我们只需要稍等一下,因为它尚未准备就绪或尚未发布所有功能。

    应用? 什么应用程序? (Apps? What Apps?)

    My first unspoken question was: What the heck are these Apps? Only Power Apps or a more general application concept? I’m still not entirely sure as it seems to be Power Apps but for some reason, Microsoft doesn’t want to explicitly say that so at the same time it’s wider than that, maybe we need to include all the other apps that are part of e.g. D365.

    我的第一个不言而喻的问题是:这些应用到底有什么用? 只有Power Apps或更一般的应用程序概念? 我仍然不能完全确定,因为它似乎是Power Apps,但是由于某些原因,Microsoft不想明确表示这一点,所以同时它要比它更广泛,也许我们需要包括所有其他的部分应用程序。例如D365。

    那么什么是CDS for Apps? (Then what is CDS for Apps?)

    My own brief definition for CDS for Apps is the data management layer of Apps.

    对于CDS for Apps,我自己的简短定义是Apps的数据管理层

    On their official site, Microsoft doesn’t define it but highlights what it can be used for. I am not sure if it’s a fully fleshed out product but could still be in the finalizing phase which will be done after releasing it as a preview kind of feature.

    Microsoft在其官方网站上没有定义它,但是突出显示了它的用途。 我不确定它是否是完全充实的产品,但仍可能处于定型阶段,该阶段将在作为预览功能发布后进行。

    Officially “Common Data Service (CDS) for Apps lets you securely store and manage data that are used by business applications. Data within CDS for Apps is stored within a set of entities. An entity is a set of records used to store data, similar to how a table stores data within a database.” – I find it a bit vague and not really clear. My quick definition also doesn’t say more but it is less cloudy.

    正式而言,“ Apps通用数据服务(CDS)使您可以安全地存储和管理业务应用程序使用的数据。 CDS for Apps中的数据存储在一组实体中。 实体是用于存储数据的一组记录,类似于表在数据库中存储数据的方式。 ” –我觉得它有点含糊不清。 我的快速定义也没有多说,但多云较少

    我们可以用吗? (Shall we use it?)

    After (not) figuring it out the answer to the first question comes the next one: Shall we use it?

    在(没有)弄清楚第一个问题的答案之后,出现了下一个问题: 我们应该使用它吗?

    How does it fit into the BI/analytics space? My take on that: it doesn’t.

    它如何适应BI /分析领域? 我的看法是: 不是

    Why do I say this? Those Apps (whatever they are) are on the other side of data: when it’s captured. Of course, there is always a “getting data” component to present the user e.g. available values, customized product list, … but the main focus is on capturing data in a form / using an ERP system / … We use the data on the other side when it is already part of the system and we extract it from there usually en masse.

    我为什么要这样说呢? 这些应用程序(无论它们是什么)都位于数据的另一端:何时被捕获。 当然,总会有一个“获取数据”组件来向用户显示,例如可用值,定制的产品列表等。但是,主要重点是以表格的形式/使用ERP系统/来捕获数据 。。。当它已经是系统的一部分时,我们通常从那里大量提取它。

    Where do the two worlds come together? Does this mean that CDS for Apps (whatever it does/will include as it evolves) is so cool, but in the backend realm we lose out on it because we want to use it but can’t?

    两个世界在哪里融合在一起? 这是否意味着CDS for Apps(无论它做什么/将包括它的发展)是如此酷,但是在后端领域中,我们会迷失它,因为我们想使用它但不能这样做?

    Be patient, I’ll answer this at the end of a next point ?

    请耐心等待,我会在下一点结束时回答这个问题?

    ETL (ETL)

    We all know what this age-old concept of Extract-Transform-Load (or nowadays often flavored as Extract-Load-Transform) means. But why do I mention it here? How is it related to CDS for Apps? Where is ETL in the current Microsoft universe?

    我们都知道这个古老的Extract-Transform-Load概念(或如今经常被称为Extract-Load-Transform)的含义。 但是为什么我在这里提到它? 它与Apps的CDS有什么关系? 当前的Microsoft Universe中的ETL在哪里?

    The whole data loading landscape is under serious changes (seemingly fast but things don’t die out that quickly and new technologies (in a production-ready state!) don’t rise that quickly either) highlighted by the followings (this is purely just based on my experience and readings) – please note that I exclude the big data world on purpose for now:

    整个数据加载格局正在发生重大变化(看似很快,但事情并不会很快消失,新技术(处于生产就绪状态!)也不会很快上升),重点是以下几点(纯粹是根据我的经验和读物)–请注意,我暂时不考虑大数据领域:

    • in the Microsoft world on premise versions are losing space against Azure

      Microsoft本地版本中的产品正在失去针对Azure的空间
    • or real servers) 或真实服务器 )开销的情况下转向平台即服务
    • SSIS is way past its heydays and, my opinion is that it will go away in a few years, it doesn’t really get any new components/features (just those that are used for other software products and get ported, so they can be used in SSIS)
    • SSIS已经过了鼎盛时期,我认为它会在几年后消失,它实际上并没有任何新的组件/功能( 只是那些用于其他软件产品并已移植的组件/功能,因此它们可以在SSIS中使用
    • or will be soon) because even though you can get SSIS in the cloud but ADF is designed with the cloud in mind from day 1. 或即将推出 )的基于云的ETL平台,因为即使您可以在云中获得SSIS,但从第一天开始,ADF的设计便考虑了云。

    A few days later after writing this paragraph, I skimmed through an official Microsoft entry about the new features of SQL Server 2019 and – sadly or not – this part seems to support my opinion:

    在写完本段后的几天后,我浏览了Microsoft的一篇有关SQL Server 2019新功能正式文章,而无论是否可悲,这一部分似乎都支持我的观点:

    • old-school T-SQL doesn’t go out of fashion in the near future 老式的 T-SQL在不久的将来不会过时

    电源查询– MMM,好吃… (Power Query – MMM, yummy…)

    How does Power Query come into the picture? It is (again!) a completely different language (or frontend for the M language which is the informal /short/ name for Power Query Formula Language) though if you are lucky you can use the drag & drop interface embedded in Excel or Power BI and at other places.

    Power Query如何进入画面? ( 再次! )它是完全不同的语言( 或M语言的前端,它是Power Query公式语言的非正式/ short /名称 ),但是如果幸运的话,您可以使用嵌入在Excel或Power BI中的拖放界面在其他地方。

    However, the graphical UI has its limitations as not every functionality of M is accessible. The gap is getting narrower at a steady pace but for the very tricky tasks, handcrafting M code could be your only option. And no matter what the marketing guys at Microsoft say: it is not easy or straightforward to use, it is not that similar to Excel’s expression language. Just see this reference website if you need convincing: https://www.powerquery.io/

    但是,图形用户界面有其局限性,因为不是M的所有功能都可以访问。 差距正在稳步缩小,但是对于非常棘手的任务,手工编写M代码可能是您唯一的选择。 而且,无论Microsoft的市场营销人员怎么说:使用起来都不容易或直接,它与Excel的表达语言并不相似。 如果您需要说服力,请访问此参考网站: https : //www.powerquery.io/

    编码–现代云时代BI开发人员的生活 (Coding – life of a BI developer in the modern cloud age)

    How many languages can a BI developer/data engineer/[future naming of such positions] have the need to use depending on source/target systems? No, despite how it starts, it’s not a joke 🙂

    BI开发人员/数据工程师/ [此类职位的未来命名]可以根据源/目标系统使用多少种语言? 不,尽管它是如何开始的,但这不是一个玩笑🙂

    The list is not exhaustive (I know some of the items are not actually coding languages but specifications or protocols but to deal with them can be equally complicated)

    列表并不详尽( 我知道有些项目实际上不是编码语言,但是规范或协议,但是处理它们可能同样复杂

    • T-SQL

      T-SQL
    • MDX (R.I.P.) => DAX MDX (RIP)=> DAX
    • Excel expression language

      Excel表达式语言
    • Power Query / M

      功率查询/ M
    • Azure CLI

      Azure CLI
    • PowerShell

      电源外壳
    • HTML / XML

      HTML / XML
    • R

      [R
    • JSON

      JSON格式
    • free text – just laugh, free text fields and files without a proper structure can be the most untameable beasts when it comes to ETL development!

      自由文本–只是开怀大笑,自由文本字段和没有适当结构的文件对于ETL开发可能是最不可思议的!
    • PowerApps syntax

      PowerApps语法

    All the above ones have a different syntax no matter how similar some of them are meant to be. I think the similarity is more often confusing than helpful.

    无论其中的某些含义多么相似,上述所有语法都有不同的语法。 我认为相似性常常使人困惑而不是有所帮助。

    And regardless of what techie celebrities say in a Coding is not difficult YouTube video, when you spend hours (if not days) trying to make a programming language do what you want because according to the specifications (or their marketing department produced such a documentation that stakeholders consider it a silver bullet) it’s hard to agree with this statement.

    而且,无论技术名人在编码中说什么都不难 ,只要您花几个小时(如果不是几天)尝试制作一种编程语言,YouTube视频就可以满足您的要求,因为根据规范( 或其市场营销部门制作了这样的文档,利益相关者认为这是灵丹妙药 ),很难同意这一说法。

    I’m sure some of you would think that such a problem can come for my lack of expertise in this or that language. I agree, it could come of that but when together with my workmates we also spend a long time not being able to come to a solution (I’m not talking about prototypes but production-ready code) that is mostly due to the complexity behind real-life scenarios when the source dataset is not a nicely prepared .csv file.

    我敢肯定,你们中的某些人会认为,由于我缺乏对此种语言的专业知识,因此可能会出现这种问题。 我同意,可能是这样,但是当我和同事一起时,我们也花了很长时间无法提出解决方案( 我不是在谈论原型而是在生产就绪的代码上 ),这主要是由于背后的复杂性源数据集不是准备充分的.csv文件时的真实场景。

    适用于应用的Power Query和CDS (Power Query and CDS for Apps)

    Finally, after all this long prologue…

    最后,经过漫长的序幕……

    So, can we use the Sheer awesomeness embedded into CDS for Apps even if we don’t use power Apps? Yes, and even more!

    因此,即使不使用强大的应用程序,我们也可以使用CDS for Apps中嵌入的绝对威力吗? 是的,甚至更多!

    Source: What is Common Data Service for Apps?

    来源: 什么是应用程序通用数据服务?

    And the very existence of this next page shows that we don’t need CDS for Apps as why would we want to limit ourselves?

    下一页的存在表明我们不需要CDS for Apps,因为我们为什么要限制自己?

    Source: Add data to an entity in Common Data Service for Apps by using Power Query

    来源: 使用Power Query将数据添加到Apps的Common Data Service中的实体

    执行开发人员摘要–再次 (Executive developer summary – once more)

    In short: my understanding is that CDS for Apps is a subset of Power Query functionality packaged together, something similar to how a SQL Server stored procedure is an abstraction layer of a bunch of T-SQL statements. You don’t need to know how to write those SQL commands, but only how to call the stored procedure, what parameters to feed and what to expect as the outcome. Same here: you don’t need to understand all the subtleties behind CDS for Apps which is like an M stored procedure (that includes connectors in my view though not in the above screenshot).

    简而言之:我的理解是CDS for Apps是打包在一起的Power Query功能的子集,类似于SQL Server存储过程是一堆T-SQL语句的抽象层的方式。 您不需要知道如何编写这些SQL命令,而只需知道如何调用存储过程,要输入的参数以及预期的结果。 此处相同:您无需了解CDS for Apps背后的所有微妙之处,就像M存储过程一样(在我看来,该连接器包括连接器,尽管上面的屏幕快照中没有)。

    So even without CDS for Apps, we can use all that and more, assuming at least one of the dev team can code M queries (Microsoft plans to introduce M into SSIS / ADF, too so it can be used in enterprise level data load processes, too!)

    因此,即使没有CDS for Apps,我们也可以使用更多的东西 ,假设至少有一个开发团队可以编写M个查询( Microsoft计划将M引入SSIS / ADF中,以便可以在企业级数据加载过程中使用它。也!

    资料目录 (Data Catalog)

    A little nugget at the end. It is important as I think integrating self-service components and enterprise level data artifacts is often very tricky. Especially in terms of understanding what we should support and what not. Finance teams are good examples how self-service approaches can easily go out of control with their monster Excel spreadsheets/Power BI desktop files/[anything else] as they can be very creative which is good up to a point, and only up to that point. Where that point is… I think we all would like to know where that is!

    最后有一个小块。 这很重要,因为我认为集成自助服务组件和企业级数据工件通常非常棘手。 特别是在理解我们应该支持什么以及不应该支持什么方面。 财务团队是很好的例子,自助服务方法可以很容易地通过其怪异的Excel电子表格/ Power BI桌面文件/ [其他]失去控制,因为它们非常有创意,这在一定程度上是有好处的,并且只有做到这一点点。 重点在哪里……我想我们大家都想知道那在哪里!

    Often the maintenance of the useful result of user creativity becomes a key question. Or the way of how to give them building blocks that are nicely tuned/maintained/documented to avoid them needing to reinvent the wheel or – what’s worse – creating their own mess.

    通常,保持用户创造力的有用结果成为一个关键问题。 或者如何为他们提供经过良好调整/维护/记录的构建基块的方法,以避免他们需要重新发明轮子,或者更糟的是创建自己的混乱。

    We are treading down that path anyway by making models in Power BI and give those to users as a centralized, supported, maintained baseline. Data Catalog is the same thing for Power Query objects.

    无论如何,我们都通过在Power BI中创建模型来走这条路,并将这些模型作为集中的,受支持的,维护的基线提供给用户。 数据目录对于Power Query对象而言是相同的。

    Let’s say we have an external data source (website) that doesn’t need to be fully integrated into our system, so it does not become part of the ETL. Power Query can connect to it and we prefer applying some best practice data cleansing steps (e.g. setting date values as date types to avoid April becoming the first month of the year…). Then instead of distributing the Excel file containing that query the way is to send it to the data catalog which is the centralized store of the Power Query queries.

    假设我们有一个外部数据源(网站),它不需要完全集成到我们的系统中,因此它不会成为ETL的一部分。 Power Query可以连接到它,我们更喜欢采用一些最佳实践数据清理步骤( 例如,将日期值设置为日期类型,以避免4月成为一年的第一个月… )。 然后,不分发包含该查询的Excel文件,而是将其发送到数据目录,该数据目录是Power Query查询的集中存储。

    Power BI数据流和“自助数据仓库” (Power BI Data Flows and “self-service data warehousing”)

    Data Flows in Power BI is a new feature, announced only 7 November 2018 so no one really has a lot of hands-on experience with it, but based on the announcement my impression is that this is the next step on the way Data Catalog was the previous station. It is really getting enterprise level in terms of infrastructure and as a canonical layer.

    Power BI中的Data Flows是一项新功能,仅在2018年11月7日发布,因此没有人真正拥有很多动手经验,但基于该发布,我的印象是这是Data Catalog的下一步发展前一站。 就基础架构和规范层而言,它确实正在达到企业级别。

    I am often cautious when Microsoft comes up with a new significant functionality – more because often their marketing team advertises it in a way that senior leaders see it as the “tool that can solve everything” – and I am somewhat confused about how Azure Data Factory and Power BI Data Flows will live side-by-side. Previously Power BI and the other Power [Somethings] targeted self-service power users and not the enterprise level ETL. Now it’s creeping into that area and if it’s conquered by it, I wonder what’s left for ADF? Maybe they consciously throw two competing projects in the mix to see what comes out of it?

    当Microsoft提出新的重要功能时,我通常会保持谨慎–更大的理由是,他们的营销团队经常以高级领导者将其视为“ 可以解决所有问题的工具 ”的方式进行广告宣传–我对Azure数据工厂的工作方式感到困惑Power BI数据流将并排运行。 以前,Power BI和其他Power [Somethings]是针对自助服务的高级用户,而不是企业级ETL。 现在它正在向该区域蔓延,如果被它所征服,我想知道ADF还剩下什么? 也许他们有意识地将两个相互竞争的项目混在一起,看看结果如何?

    I would reserve my judgment for now about such concepts as “self-service data preparation” and “self-service data warehousing” but I have to admit that these can have very significant implications to an organization and in both ways. I’m more anxious than enthused but that might come from my position as I am not on the self-service side.

    对于“ 自助数据准备 ”和“ 自助数据仓库 ”之类的概念,我现在将保留自己的判断力,但是我不得不承认,这些概念对组织和两种方式都可能具有非常重要的意义。 我比热情更焦虑,但这可能来自我的立场,因为我不在自助服务方面。

    Time will tell, but until then let me quickly recap my understanding of Data Flows. It’s everything that was in Data Catalog: a power user creates a nice data prep and load logic using Power Query and then publishes it, so it becomes available for others in the same organization (so far not a lot of difference…) but there are two major improvements:

    时间会证明一切,但是在此之前,让我快速回顾一下我对数据流的理解。 这就是数据目录中的所有内容:高级用户使用Power Query创建了一个不错的数据准备和加载逻辑,然后将其发布,因此它可用于同一组织中的其他人( 到目前为止并没有太大的区别 ……),但是有两项重大改进:

    • It’s a PaaS that stores data in Azure Data Lake Storage Gen2, so it will perform quite well, and a lot of other Azure services can be plugged into it (Databricks, Machine Learning components, …)

      这是一个PaaS,可将数据存储在Azure Data Lake Storage Gen2中,因此它将运行良好,并且可以将许多其他Azure服务(Databricks,机器学习组件等)插入其中。
    • There will be Common Data Models available that are industry standard and – hopefully – customizable data flows covering areas that appear at many companies in the same industry. Common entities (e.g. Account, Customer) are provided too as usually, companies don’t need to reinvent the wheel but smartly use what is already available!

      将提供符合行业标准的通用数据模型,并且希望有可定制的数据流,这些数据流涵盖了同一行业中许多公司出现的领域。 通常也提供常见的实体(例如,帐户,客户),公司不需要重新发明轮子,而是巧妙地使用已有的东西!

    The licensing is not totally clear for me, but I assume that, and the actual technology will gradually evolve starting in the near future.

    对于我来说,许可不是很清楚,但是我认为,实际的技术将在不久的将来逐步发展。

    Some very low level details are already available in Amir Netz’s whitepaper if you want to dive really deep.

    如果您想深入了解,那么Amir Netz的白皮书中已经提供了一些非常低级的详细信息。

    Thanks for reading if you’ve managed to get to this point! Feel free to comment and/or correct!

    如果您已成功理解到这一点,感谢您的阅读! 随时发表评论和/或纠正!

    翻译自: https://www.sqlshack.com/cds-for-apps-in-the-power-world/

    cds5516舵机控制程序

    展开全文
  • mg995舵机控制程序

    热门讨论 2013-05-04 10:18:56
    舵机转角90度 *************************************/ void t1() { while(1) { if(count1==41) { …… /************************************* 舵机转角45度 ************************************/ void t2...
  • 利用verilog语言编写的简单控制舵机程序,可以自己调节角度和舵机个数
  • 单个舵机控制程序

    千次阅读 2019-08-12 09:06:13
    * 说 明:12M晶振,12分频,所以计数器每递增一个数就是1微秒,完全满足舵机控制的精度要求 因为定时器是TH0,TL0都要全部计数到0xFF后在计1个数就会产生中断,所以要想产生 x毫秒的中断,那么TH0,TL0就应该...
    /*****************************************************************************
     ** 文件			: main.c
     ** 作者			: Zheng23
     ** 日期			: 			
     ** 功能			: 
    /*****************************************************************************/
    //#include <STC15.h>
    //#include"STC89C5xRC.H"
    
    
    //一定要用12M的晶振
    //一定要用12M的晶振
    //一定要用12M的晶振
    //一定要用12M的晶振
    //一定要用12M的晶振
    //一定要用12M的晶振
    
    #include "reg51.h"
    
    #define uint8	unsigned char    
    #define uint16	unsigned short int
    #define uint32	unsigned long 
    
    sbit SERVO0=P1^4;			//控制舵机的PWM输出口
    
    uint16 Servo0PwmDuty=1500;	//PWM脉冲宽度
    
    /***********************************************************
    * 名    称: DelayMs(uint16 ms) 
    * 功    能: 延时ms毫秒
    * 入口参数: ms	毫秒
    * 出口参数: 无
    * 说    明: 					 
    /**********************************************************/
    void DelayMs(uint16 ms)
    {
    	uint16 i,j;
    	for(i=0;i<85;i++)		//89单片机用85,12系列单片机用800
    		for(j=0;j<ms;j++);
    }
    /***********************************************************
    * 名    称:InitTimer0()
    * 功    能:时钟0初始化
    * 入口参数:无
    * 出口参数:无
    * 说    明:12M晶振,12分频,所以计数器每递增一个数就是1微秒,完全满足舵机控制的精度要求
    			因为定时器是TH0,TL0都要全部计数到0xFF后在计1个数就会产生中断,所以要想产生
    			x毫秒的中断,那么TH0,TL0就应该赋值(0xFFFF-x)	从这个值开始计数产生定时中断					 
    /**********************************************************/ 
    void InitTimer0(void)
    {
    	TMOD &= 0xF0;		//设置定时器模式
    	TMOD |= 0x01;		//设置定时器模式
    	TL0 = 0x00;			//设置定时初值
    	TH0 = 0x00;			//设置定时初值
    	TF0 = 0;			//清除TF0标志
    	TR0 = 1;			//定时器0开始计时
    	ET0 = 1;			//开定时器0中断
    }
    /***********************************************************
    * 名    称:Timer0Value(uint16 pwm)  
    * 功    能:给定时器0计数器赋值产生定时中断 
    * 入口参数:pwm		控制舵机的PWM脉冲宽度值(范围:500~2500)
    * 出口参数:无
    * 说    明:12M晶振,12分频,所以计数器每递增一个数就是1微秒,完全满足舵机控制的精度要求
    			因为定时器是TH0,TL0都要全部计数到0xFF后在计1个数就会产生中断,所以要想产生
    			pwm毫秒的中断,那么TH0,TL0就应该赋值(0xFFFF-pwm)	从这个值开始计数产生定时中断 					 
    /**********************************************************/ 
    void Timer0Value(uint16 pwm)
    {
    	uint16 value;
    	value=0xffff-pwm;	
    	TR0 = 0;
    	TL0=value;			//16位数据给8位数据赋值默认将16位数据的低八位直接赋给八位数据
        TH0=value>>8;		//将16位数据右移8位,也就是将高8位移到低八位,再赋值给8位数据	
    	TR0 = 1;
    }
    /***********************************************************
    * 名    称: main()
    * 功    能: 入口函数
    * 入口参数: 无
    * 出口参数: 无
    * 说    明: 					 
    /**********************************************************/ 
    void main(void)
    {
    
    	InitTimer0();	//定时器0初始化
    	EA = 1;			//开总中断
    	while(1)		//大循环
    	{	
    		Servo0PwmDuty = 500;		//脉冲宽度在500微秒,对应-90°
    		DelayMs(1000);		//延时1秒
    		Servo0PwmDuty = 1000;	//脉冲宽度在1000微秒,对应-45°
    		DelayMs(1000);
    		Servo0PwmDuty = 1500;
    		DelayMs(1000);
    		Servo0PwmDuty = 2000;
    		DelayMs(1000);
    		Servo0PwmDuty = 2500;
    		DelayMs(1000);
    		Servo0PwmDuty = 2000;
    		DelayMs(1000);
    		Servo0PwmDuty = 1500;
    		DelayMs(1000);
    		Servo0PwmDuty = 1000;
    		DelayMs(1000);
    	}
    }
    
    /***********************************************************
    * 名    称: Timer0_isr() interrupt 1 using 1
    * 功    能: 时钟0中断处理
    * 入口参数: 无
    * 出口参数: 无
    * 说    明: 					 
    /**********************************************************/ 
    void Timer0_isr(void) interrupt 1 using 1
    {
    	static uint16 i = 1;	//静态变量:每次调用函数时保持上一次所赋的值,
    							//跟全局变量类似,不同是它只能用于此函数内部
    	switch(i)
    	{
    		case 1:
    			SERVO0 = 1;	//PWM控制脚高电平
    			//给定时器0赋值,计数Pwm0Duty个脉冲后产生中断,下次中断会进入下一个case语句
    			Timer0Value(Servo0PwmDuty);	
    			break;
    		case 2:
    			SERVO0 = 0;	//PWM控制脚低电平
    			//高脉冲结束后剩下的时间(20000-Pwm0Duty)全是低电平了,Pwm0Duty + (20000-Pwm0Duty) = 20000个脉冲正好为一个周期20毫秒 
    			Timer0Value(20000-Servo0PwmDuty);
    			i = 0;	
    			break;	 
    	}
    	i++;
    }

     

    展开全文
  • 用一个定时器实现8路PWM舵机控制输出,可实现8路舵机控制,通过串口输入舵机偏移,通过io口发出pwm 50Hz。可以实现廉价的舵机控制板。
  • 实用的舵机操作程序,已经验证通过,现在将整个工程文件上传来,有需要的可以参考一下,可以根据自己开发板进行适当修改即可
  • 一个控制数字舵机的设计程序,采用C语言编写,支持Dynamixel 通信协议 ,案例是AVR单片。实际上可以采用FPGA,例如SOPC系统上,可控制小型机器人。
  • 伺服舵机控制程序

    2012-12-12 16:11:10
    /*****************************...功能:KC伺服舵机测试程序 说明:P1_0接左电机,P1_1接右电机 时间:2012.12.12 作者:荆轩道 ************************************************************/ #include #incl

    /***********************************************************
    功能:KC伺服舵机测试程序
    说明:P1_0接左电机,P1_1接右电机
    时间:2012.12.12
    作者:荆轩道
    ************************************************************/
    #include<BoeBot.h>
    #include<uart.h>


    /*小车全速前进*/
    void forward()
    {
      P1_0=1;              //P1_0输出高电平 
      delay_nus(1700);       //延时1700ns
      P1_0=0;              //P1_0输出低电平               
      delay_nms(20);     //延时20ms

      P1_1=1;      //P1_1输出高电平
      delay_nus(1300);       //延时1500ns
      P1_1=0;     //P1_1输出低电平
      delay_nms(20);     //延时20ms
    }  
    /*小车停止*/
    void stop()
    {
      P1_0=0;              //P1_0输出高电平
      P1_1=0;      //P1_1输出高电平
      delay_nus(1500);       //延时1500ns
      P1_0=0;              //P1_0输出低电平
      P1_1=0;              //P1_1输出低电平
      delay_nms(20);     //延时20ms
    }

    /*小车全速后退*/
    void back()
    {
      P1_0=1;              //P1_0输出高电平 
      delay_nus(1300);       //延时1500ns
      P1_0=0;              //P1_0输出低电平               
      delay_nms(20);     //延时20ms

      P1_1=1;      //P1_1输出高电平
      delay_nus(1700);       //延时1500ns
      P1_1=0;     //P1_1输出低电平
      delay_nms(20);     //延时20ms
    }  
    /*绕中心右转*/
    void turn_right_center()

      P1_0=1;              //P1_0输出高电平
      P1_1=1;      //P1_1输出高电平
      delay_nus(1300);   //延时500ms
      P1_0=0;              //P1_0输出低电平
      P1_1=0;              //P1_1输出低电平
      delay_nms(20);     //延时20ms
    }

    /*绕中心左转*/
    void turn_lift_center()

      P1_0=1;              //P1_0输出高电平
      P1_1=1;      //P1_1输出高电平
      delay_nus(1700);   //延时500ms
      P1_0=0;              //P1_0输出低电平
      P1_1=0;              //P1_1输出低电平
      delay_nms(20);     //延时20ms
    }
    void direction_right()
    {
       int i;
     for(i=0;i<=2000;i+=4)
     {
       P1_2=1;
       delay_nus(500+i);
       P1_2=0;              //P1_1输出低电平
       delay_nms(20);
     }
    }

    int main(void)
    {
     int i;
     uart_Init();             //初始化串口
     printf("The LEDs connected to P1_0 and P1_1 are blinking!\n ");
     while(1)

     {

       for(i=0;i<50;i++)
       {
          forward();
       }
        for(i=0;i<20;i++)
       {
          stop();
       }

        for(i=0;i<16;i++)
       {
         turn_lift_center();
       }
        for(i=0;i<20;i++)
       {
          stop();
       }
        for(i=0;i<50;i++)
       {
          back();
       }
       for(i=0;i<20;i++)
       {
          stop();
       }
       direction_right();

     }

    }

     

    展开全文
  • C++编写,有串口,可以同时控制6个舵机,实现不同舵机不同转动角度
  • 虽然舵机控制原理比较简单统一,但是PWM控制舵机程序实现方式多种多样,有的使用延时(delay(ms)),有的使用定时器(time),而网上搜到的大部分控制代码却质量一般,控制精度都需要提高,就要对单片机定时器有...
  • 基于arduino 6自由度机械臂舵机控制程序

    万次阅读 多人点赞 2018-08-02 23:23:40
    //直接可以通过上位机或者蓝牙模块实现机械臂的控制,只需要把每个舵机转动角度传送过来即可 #include &lt;Servo.h&gt;  Servo myservo[6]; //定义一个comdata字符串变量,赋初值为空值 String comdata =...
  • 51单片机超高精度6路舵机控制程序

    千次阅读 2016-08-08 09:43:54
    之前写了一个51单片机的6路舵机程序,其原理很简单,舵机需要一个约20ms的脉冲,其中高电平0.5-2.5ms,其余为低电平。这样我们可以用一个定时器,每0.1ms中断,各用一个变量来记录每个舵机的计数,这样就用软件方式...
  • 好了,关于我们这款DIY项目中的另一个关键模块—语音播报模块的使用就介绍到这里了,在下一篇文章中,笔者将会给大家介绍4个舵机控制程序,敬请关注! 欢迎大家点赞、分享、转发,你们的关注是我坚持写作的动力!...
  • 程序如下 #include "sys.h" #include "delay.h" #include "usart.h" #include "led.h" #include "pwm.h" //ALIENTEK 探索者STM32F407开发板 实验9 //PWM输出实验-库函数版本 //技术支持:...
  • 用C语言编写舵机常用控制程序,以51系类单片机为载体,用于智能小车车轮控制;多关节教学机械手;电子类竞赛常用舵机控制
  • TQ2440裸机开发舵机控制测试程序。1.利用Timer1的PWM功能实现TOUT1输出舵机控制信号;2.模仿C51程序,Timer1定时并设置Timer1中断,中断函数控制GPA0输出PWM信号。上述2个程序均利用串口接收键盘输入,键盘+和-,...
  • FPGA控制舵机程序

    2020-07-15 11:43:34
    舵机是一种角度伺服的电机,适用于那些需要角度不断变化并可以保持的控制系统。下面一起来学习FPGA控制舵机程序
  • 单片机控制舵机程序

    2018-09-09 23:31:57
    单片机控制舵机程序,可适用于任何与舵机有关的课程设计与毕业设计。
  • 这是一个基于89C51的舵机简单控制程序,实现控制一个云台的扫描可以精确控制;适合初学者更加了解舵机的控制方式;功能:控制云台进行水平0--180°,垂直0--30°(可调)的范围内无缝扫描;当遇到火源,立即停止扫描...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 394
精华内容 157
关键字:

舵机控制程序