首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从arduino到netmf

从arduino到netmf
EN

Stack Overflow用户
提问于 2013-09-10 22:34:38
回答 1查看 168关注 0票数 0

有人能帮我把arduino项目的一些代码翻译成netmf吗?这就是我从arduino项目中得到的:

代码语言:javascript
复制
int angle = 3000//angle is int 500 to 5500

unsigned int temp;
byte pos_hi,pos_low;

temp = angle & 0x1f80;  //get bits 8 thru 13 of position
pos_hi = temp >> 7;     //shift bits 8 thru 13 by 7
pos_low = angle & 0x7f; //get lower 7 bits of position

如何将其转换为C#中的netmf项目?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-09-11 21:58:52

代码语言:javascript
复制
uint angle = 3000;//angle is int 500 to 5500

uint temp;
byte pos_hi,pos_low;

temp = angle & 0x1f80;  //get bits 8 thru 13 of position
pos_hi = (byte) (temp >> 7);     //shift bits 8 thru 13 by 7
pos_low = (byte) (angle & 0x7f); //get lower 7 bits of position
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18729837

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档