<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>虎子哥官方博客 - Engineer</title><link>http://freegezi.net/blog/</link><description>Good Luck To You! - </description><generator>RainbowSoft Studio Z-Blog 1.8 Walle Build 100427</generator><language>zh-CN</language><copyright>  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-753177-1']);  _gaq.push(['_trackPageview']);  (function() {    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);  })();</copyright><pubDate>Tue, 07 Sep 2010 22:20:59 +0800</pubDate><item><title>ARM导星系统摆拍</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/931.html</link><pubDate>Thu, 10 Jun 2010 21:54:18 +0800</pubDate><guid>http://freegezi.net/blog/post/931.html</guid><description><![CDATA[<p>嘿嘿</p><p><img title="" alt="" src="http://freegezi.net/blog/upload/201006102155518006.jpg" onload="ResizeImage(this,450)" /></p>]]></description><category>Engineer</category><comments>http://freegezi.net/blog/post/931.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=931</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=931&amp;key=effbad94</trackback:ping></item><item><title>ARM导星系统开发笔记(二)</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/930.html</link><pubDate>Sun, 06 Jun 2010 15:42:32 +0800</pubDate><guid>http://freegezi.net/blog/post/930.html</guid><description><![CDATA[<p>今天给系统加入了串口通讯，可以发送字符指令控制Autostar。从Usart出来的电平需要先转换成TTL电平再能跟PC串口通讯。折腾大半天，终于搞定Autostar的连接线，实现整个回馈系统。</p><blockquote>void USART_GPIO_Init(void){<br />&nbsp; GPIO_InitTypeDef GPIO_InitStructure;<br />&nbsp; RCC_APB2PeriphClockCmd (RCC_APB2Periph_GPIOA|RCC_APB2Periph_AFIO|RCC_APB2Periph_USART1 ,ENABLE);<br />&nbsp; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;<br />&nbsp; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;<br />&nbsp; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;&nbsp; //推挽输出-TX<br />&nbsp; GPIO_Init(GPIOA, &amp;GPIO_InitStructure);<br />&nbsp; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;<br />&nbsp; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; //浮空输入-RX<br />&nbsp; GPIO_Init(GPIOA, &amp;GPIO_InitStructure);<br />&nbsp; USART_Configuration();<br />}<br />void USART_Configuration(void){<br />&nbsp;&nbsp; USART_InitTypeDef USART_InitStructure;<br />&nbsp;&nbsp; USART_ClockInitTypeDef USART_ClockInitStructure;<br />&nbsp;&nbsp; USART_StructInit(&amp;USART_InitStructure);<br />&nbsp;&nbsp; USART_ClockStructInit (&amp;USART_ClockInitStructure);<br />&nbsp;&nbsp; USART_ClockInit(USART1, &amp;USART_ClockInitStructure);<br />&nbsp;&nbsp; USART_Init(USART1, &amp;USART_InitStructure);<br />&nbsp;&nbsp; USART_Cmd(USART1, ENABLE);<br />}<br />void USART1_Puts(char * str)<br />{<br />&nbsp;&nbsp;&nbsp; while(*str)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; USART_SendData(USART1, *str++);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET);<br />&nbsp;&nbsp;&nbsp; }<br />}</blockquote>]]></description><category>Engineer</category><comments>http://freegezi.net/blog/post/930.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=930</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=930&amp;key=b9c8cb6c</trackback:ping></item><item><title>ARM导星系统开发笔记(一)</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/929.html</link><pubDate>Fri, 04 Jun 2010 20:23:08 +0800</pubDate><guid>http://freegezi.net/blog/post/929.html</guid><description><![CDATA[<p>GetLightZone函数主要实现获取整个屏幕最亮的区域(通过按键中断调用), GetPixelPos函数在图像刷新之后获取锁定亮区域的星点中心坐标.</p><blockquote>void GetLightZone(void){<br />&nbsp; int i=0,j=0,ii=0,jj=0;<br />&nbsp; long totalLight=0,maxLight=0,pixel=0;<br />&nbsp; <br />&nbsp; for(i=0;i&lt;24;i++){<br />&nbsp;&nbsp; &nbsp;for(j=0;j&lt;32;j++){<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;totalLight = 0;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;for(ii=0;ii&lt;10;ii++){<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;for(jj=0;jj&lt;10;jj++){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pixel=GetLight(LCD_RD_PIXEL(i*10+ii,j*10+jj));<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;totalLight+=pixel;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(totalLight&gt;maxLight){<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;maxLight=totalLight*1;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;posBlock[0] = (int)(i/3)*w;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;posBlock[1] = (int)(j/3)*w;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br />&nbsp;&nbsp; &nbsp;}<br />&nbsp; }<br />}<br />void GetPixelPos(void){<br />&nbsp; unsigned int&nbsp; i=0,j=0,w2=w/2;<br />&nbsp; unsigned long maxI = 0,maxJ=0,tempI=0,tempJ=0;<br />&nbsp; for(i=0;i&lt;w;i++){<br />&nbsp;&nbsp; &nbsp;tempI = 0;<br />&nbsp;&nbsp; &nbsp;tempJ = 0;<br />&nbsp;&nbsp; &nbsp;for(j=0;j&lt;w;j++){<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;tempJ+=GetLight(LCD_RD_PIXEL(posBlock[0]+i,posBlock[1]+j));<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;tempI+=GetLight(LCD_RD_PIXEL(posBlock[0]+j,posBlock[1]+i));<br />&nbsp;&nbsp; &nbsp;}<br />&nbsp;&nbsp; &nbsp;if(maxJ&lt;tempJ){<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;maxJ = tempJ;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;centerX=posBlock[0]+i;<br />&nbsp;&nbsp; &nbsp;}<br />&nbsp;&nbsp; &nbsp;if(maxI&lt;tempI){<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;maxI = tempI;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;centerY=posBlock[1]+i;<br />&nbsp;&nbsp; &nbsp;}<br />&nbsp; }<br />&nbsp; posBlock[0]=centerX-w2;<br />&nbsp; if(centerX&lt;w2){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; posBlock[0]=0;<br />&nbsp; }<br />&nbsp; if(centerX&gt;224){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; posBlock[0]=209;<br />&nbsp; }<br />&nbsp; posBlock[1]=centerY-w2;<br />&nbsp; if(centerY&lt;w2){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; posBlock[1]=0;<br />&nbsp; }<br />&nbsp; if(centerY&gt;304){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; posBlock[1]=289;<br />&nbsp; }<br />}</blockquote><p>&nbsp;这是用70mmF5抓取的星点,天蝎座某星</p><p><img title="" alt="" src="http://freegezi.net/blog/upload/201006042330525708.jpg" onload="ResizeImage(this,450)" /></p><p><img title="" alt="" src="http://freegezi.net/blog/upload/201006042332402002.jpg" onload="ResizeImage(this,450)" /></p>]]></description><category>Engineer</category><comments>http://freegezi.net/blog/post/929.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=929</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=929&amp;key=921f141c</trackback:ping></item><item><title>开发基于ARM(CORTEX M3)自动导星系统</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/928.html</link><pubDate>Thu, 03 Jun 2010 00:21:51 +0800</pubDate><guid>http://freegezi.net/blog/post/928.html</guid><description><![CDATA[<p>上周买了一块基于stm32的camera开发板,花了一周时间学习ARM.在多个嵌入式高手的帮助指导下,终于在昨晚理解了整个系统,今天终于实现了图像数据的采集功能.</p><p>图像采集的大问题已基本解决,接下来就是要开发通讯协议控制goto或者通过PWM控制电机驱动.哈哈</p><p><img src="http://freegezi.net/blog/upload/201006030031155572.jpg" alt="" /></p>]]></description><category>Engineer</category><comments>http://freegezi.net/blog/post/928.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=928</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=928&amp;key=3bbdec6f</trackback:ping></item><item><title>基于Python for S60的自动导星程序(四)</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/913.html</link><pubDate>Wed, 10 Mar 2010 22:58:13 +0800</pubDate><guid>http://freegezi.net/blog/post/913.html</guid><description><![CDATA[<p>今天又用手机导星系统拍了10几张照片,只有两张尚可,这两张均为天狼星作导星,用猎户座episode星(1.7等)做导星基本上有不规则运动.<br />除了导星的亮度问题还有一个是机械问题,好几次是因为相机在球台上滑动了位置,另外一个问题是程序自动关闭,初步判断是电量变化提醒造成的</p><p>600秒,镜头焦距210mm@f22,iso100</p><p><img onload="ResizeImage(this,450)" src="http://freegezi.net/blog/upload/201003102306597365.jpg" alt="" title="" /></p><p>M41,600秒,镜头焦距210mm@f22,iso100</p><p><img onload="ResizeImage(this,450)" src="http://freegezi.net/blog/upload/201003102307095167.jpg" alt="" title="" /><br />手机导星工作照</p><p><img title="" alt="" src="http://freegezi.net/blog/upload/201003102312208688.jpg" onload="ResizeImage(this,450)" /></p><p>正面<br /><img title="" alt="" src="http://freegezi.net/blog/upload/201003102312397481.jpg" onload="ResizeImage(this,450)" /></p>]]></description><category>Engineer</category><comments>http://freegezi.net/blog/post/913.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=913</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=913&amp;key=465c01f1</trackback:ping></item><item><title>基于Python for S60的自动导星程序(三)</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/912.html</link><pubDate>Tue, 09 Mar 2010 22:51:58 +0800</pubDate><guid>http://freegezi.net/blog/post/912.html</guid><description><![CDATA[<p>很久没有在南方的三月份看见下雪了,这次冷空气也带来了久违的晴天.下班回家后就开始把flash版的自动导星程序移植到python,没花多少时间把程序调试运行在手机上.<br />终于到了实际拍摄验证效果的时刻.目标依旧是天狼星<br />依次拍了60秒(F8),180秒(F22),900秒(F22),ISO均是100,镜头焦距135mm,机身EOS 300D,手机N6120C,赤道仪LXD75(朝南卧室,没有对极轴,仅通过指南针估计一下方向)</p><p>图像均为RAW转JPG,100%裁切</p><p><img title="" alt="" src="http://freegezi.net/blog/upload/201003092259510221.jpg" onload="ResizeImage(this,450)" /><br />60秒</p><p><img title="" alt="" src="http://freegezi.net/blog/upload/201003092300157834.jpg" onload="ResizeImage(this,450)" /><br />180秒</p><p><img title="" alt="" src="http://freegezi.net/blog/upload/201003092300406783.jpg" onload="ResizeImage(this,450)" /><br />900秒</p><p><img title="" alt="" src="http://freegezi.net/blog/upload/201003092300573537.jpg" onload="ResizeImage(this,450)" /></p><p>最后一张是手机在第一次拍900秒到一半的时候,程序自动退出</p>]]></description><category>Engineer</category><comments>http://freegezi.net/blog/post/912.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=912</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=912&amp;key=3662099e</trackback:ping></item><item><title>基于Python for S60的自动导星程序(二)</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/911.html</link><pubDate>Sat, 06 Mar 2010 17:01:32 +0800</pubDate><guid>http://freegezi.net/blog/post/911.html</guid><description><![CDATA[<p>手机键盘在使用viewfinder的时候不能用keyEvent检测,从pycamera的例子找到利用viewfinder.getEvents()方法获取键盘按下事件的检测</p><blockquote>for ev in viewfinder.getEvents():<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; keyHandleEvent(ev)</blockquote><p>星点中心的判断,是通过灰度最大值来确定高亮区的中心位置,程序如下</p><blockquote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxY=0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; posx = 0;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; posy = 0;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; p255 = math.pow(255,5)<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for i in xrange(0,aCols):<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; line=0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for j in xrange(0,aRows):<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (r,g,b) = Image.GetPixel(i,j)<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gy=(r * 0.30 + g * 0.59 + b * 0.11);<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; line+=math.pow(gy,6)/p255<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if maxY&lt;line:<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxY = line<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; posx = i<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxX=0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for i in xrange(0,aRows):<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; line=0<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for j in xrange(0,aCols):<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (r,g,b) = Image.GetPixel(j,i)<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gy=(r * 0.30 + g * 0.59 + b * 0.11);<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; line+=math.pow(gy,6)/p255<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if maxX&lt;line:<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxX = line<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; posy = i</blockquote>]]></description><category>Engineer</category><comments>http://freegezi.net/blog/post/911.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=911</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=911&amp;key=dfa23cb7</trackback:ping></item><item><title>基于Python for S60的自动导星程序(一)</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/pys60-for-auto-guider.html</link><pubDate>Wed, 03 Mar 2010 22:13:06 +0800</pubDate><guid>http://freegezi.net/blog/post/pys60-for-auto-guider.html</guid><description><![CDATA[<p>从irxon购入一个bt5701的蓝牙串口,今天到了.刚到家就迫不及待开始写手机蓝牙通讯的代码.</p><blockquote>import appuifw<br />import socket<br />import e32<br />def bt_connect():<br />&nbsp;&nbsp; &nbsp;global sock<br />&nbsp;&nbsp; &nbsp;sock=socket.socket(socket.AF_BT,socket.SOCK_STREAM)<br />&nbsp;&nbsp; &nbsp;target=''<br />&nbsp;&nbsp; &nbsp;if not target:<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;address,services=socket.bt_discover()<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;print &quot;Discovered: %s, %s&quot;%(address,services)<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if len(services)&gt;1:<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;import appuifw<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;choices=services.keys()<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;choices.sort()<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;choice=appuifw.popup_menu([unicode(services[x])+&quot;: &quot;+x for x in choices],u'Choose port:')<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;target=(address,services[choices[choice]])<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;else:<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;target=(address,services.values()[0])<br />&nbsp;&nbsp; &nbsp;print &quot;Connecting to &quot;+str(target)<br />&nbsp;&nbsp; &nbsp;sock.connect(target)<br />&nbsp;&nbsp; &nbsp;print &quot;OK.&quot;<br />&nbsp;&nbsp; &nbsp;bt_typetext()<br /><br />def bt_typetext():<br />&nbsp;&nbsp; &nbsp;global sock<br />&nbsp;&nbsp; &nbsp;test = appuifw.query(u&quot;Type words&quot;, &quot;text&quot;, u&quot;&quot;)<br />&nbsp;&nbsp; &nbsp;if test == None:<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;exit_key_handler()<br />&nbsp;&nbsp; &nbsp;else:<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;sock.send(test)<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;bt_typetext()<br /><br />def exit_key_handler():<br />&nbsp;&nbsp; &nbsp;script_lock.signal()<br />&nbsp;&nbsp; &nbsp;appuifw.app.set_exit()<br /><br />appuifw.app.title = u&quot;bt mob to PC&quot;<br />script_lock = e32.Ao_lock()<br />appuifw.app.exit_key_handler = exit_key_handler()<br />bt_connect()<br />script_lock.wait()</blockquote><p>&nbsp;依次发送指令(区分大小写)给LXD75</p><blockquote>:RM#<br />:Ms#<br />:Qs#</blockquote><p>&nbsp;成功实现16倍速,向南转动,向南转动停止</p>]]></description><category>Engineer</category><comments>http://freegezi.net/blog/post/pys60-for-auto-guider.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=910</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=910&amp;key=0c6c7a21</trackback:ping></item><item><title>Python for S60开发入门</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/909.html</link><pubDate>Sun, 28 Feb 2010 22:09:19 +0800</pubDate><guid>http://freegezi.net/blog/post/909.html</guid><description><![CDATA[<p>(1)Python for S60是Python在Nokia S60平台上的解释器,功能相对于flash要强大,比java开发更简单<br />PyS60安装文件可以在<a target="_blank" href="http://sourceforge.net/projects/pys60/files/">http://sourceforge.net/projects/pys60/files/</a><br />需要安装2个文件,<span style="font-family: 宋体;">PythonScriptShell.SIS</span><span style="font-family: 宋体;">和</span><span style="font-family: 宋体;">PythonForS60.SIS</span><br />如果不需要在PC模拟调试的话,可以用记事本写好脚本直接放手机Python文件夹运行,作者一般是用nokia的pc套装连接手机进行程序调试<br />手机上也有个python编辑器叫PED,<a target="_blank" href="http://code.google.com/p/ped-s60/">http://code.google.com/p/ped-s60/</a></p><p>(2)NokiaCV LIB是Nokia为Symbian平台提供的开源图像处理扩展库 <a target="_blank" href="http://research.nokia.com/research/projects/nokiacv">http://research.nokia.com/research/projects/nokiacv</a><br />下载安装NokiaCV for python,<br /><a target="_blank" href="http://freegezi.net/blog/upload/ncvlib11.rar">ncvlib11.rar</a><br /><a target="_blank" href="http://freegezi.net/blog/upload/pyncvlib11.rar">pyncvlib11.rar</a></p><p>(3)补充一个lightblue是Python蓝牙API<br /><a href="http://lightblue.sourceforge.net/" target="_blank">http://lightblue.sourceforge.net/</a></p><p>sis,sisx安装时如果提示证书过期,请先调小手机日期年份到2009年再安装</p><p>我的目标是手机摄像头采集图像-&gt;python处理图像-&gt;通过蓝牙发送命令控制外部蓝牙串口,就差蓝牙控制的程序验证了</p>]]></description><category>Engineer</category><comments>http://freegezi.net/blog/post/909.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=909</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=909&amp;key=2d798839</trackback:ping></item><item><title>猎户座大星云</title><author>webmaster@freegezi.net (indream)</author><link>http://freegezi.net/blog/post/猎户座大星云.html</link><pubDate>Wed, 18 Mar 2009 17:28:18 +0800</pubDate><guid>http://freegezi.net/blog/post/猎户座大星云.html</guid><description><![CDATA[<p><img height="362" width="500" onload="ResizeImage(this,520)" src="/blog/UPLOAD/content/content/200811181729120265.jpg" alt="" /><br /><br/>第一次拍深空</p>]]></description><category>Engineer</category><comments>http://freegezi.net/blog/post/猎户座大星云.html#comment</comments><wfw:comment>http://freegezi.net/blog/</wfw:comment><wfw:commentRss>http://freegezi.net/blog/feed.asp?cmt=755</wfw:commentRss><trackback:ping>http://freegezi.net/blog/cmd.asp?act=tb&amp;id=755&amp;key=4bb7c4fa</trackback:ping></item></channel></rss>
