tag:blogger.com,1999:blog-46423850598240182722024-03-13T03:30:45.539-04:00Mr. Y's Lab NotesDiscussions About Using PyMata, s2a_fm, and Physical Computing.Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.comBlogger136125tag:blogger.com,1999:blog-4642385059824018272.post-67108700516694639552019-05-06T10:49:00.000-04:002019-05-06T10:49:16.465-04:00<h2 style="text-align: center;">
It's Been Over A Year Since My Last Post</h2>
<div style="text-align: left;">
You may have been wondering where I've been ( but probably not ;-) ). It does not feel like so much time has gone by, but it has.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
In that time, I've published , <a href="https://mryslab.github.io/pymata-express/" target="_blank"><b>pymata-express</b></a>, my latest attempt at an Arduino Firmata client, and have been working on some additional features for <a href="https://mryslab.github.io/python_banyan/#" target="_blank"><b>python-banyan</b></a>.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The <b>pymata-express</b> project is a pure Python asyncio implementation that uses the latest asyncio features released with Python 3.7. Here are its main features:</div>
<ul>
<li> An improved and simplified <a href="http://htmlpreview.github.io/?https://github.com/MrYsLab/pymata-express/blob/master/documentation/api/pymata_express.html" target="_blank">API</a>.</li>
<li>A <a href="https://mryslab.github.io/pymata-express/examples/" target="_blank">full set of working examples</a> has been supplied with the project.</li>
<li>A new Arduino sketch, called <a href="https://github.com/MrYsLab/FirmataExpress" target="_blank">FirmataExpress</a>, was developed to be used in conjunction with pymata-express.</li>
<li>When using FirmataExpress:</li>
<ul>
<li>The Arduino serial link runs at 115200 </li>
<li>Arduino auto-discovery has been greatly improved by adding a handshake to the Arduino when the auto-discovery process takes place.</li>
</ul>
</ul>
For <b>python-banyan</b>, I have improved the documentation, added a simplified set of examples to the tutorials and developed a concept I call OneGPIO. OneGPIO is a <a href="https://github.com/MrYsLab/python_banyan/blob/master/projects/OneGPIO/message_specification/OneGPIO.pdf" target="_blank">generalized GPIO specification </a>in the form of a set of Banyan protocol messages. Essentially, you create a GPIO application by creating a Banyan component that publishes OneGPIO messages, and specialized Banyan components, called OneGPIO Gateways, subscribe to these messages and then translate the messages into specific target hardware native GPIO API calls. You code your application once, and then you will be able to run your application on any of the supported platforms (Arduino, ESP-8266, and Raspberry Pi) without any additional code changes.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeIapwmr1L49x0kQK2OtAOBZE8saVvq7Fts98Q5pd5Q1WXGO8oJqvxnSd0-AoF1y5LwCVygY21MhNZEzD216UnY0I29VVA5rdv1AW_ErbFpH3yxSkxX3BhHIGZupi_583yXu_Pg2PcleO-/s1600/one_gpio.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="794" data-original-width="1041" height="488" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeIapwmr1L49x0kQK2OtAOBZE8saVvq7Fts98Q5pd5Q1WXGO8oJqvxnSd0-AoF1y5LwCVygY21MhNZEzD216UnY0I29VVA5rdv1AW_ErbFpH3yxSkxX3BhHIGZupi_583yXu_Pg2PcleO-/s640/one_gpio.png" width="640" /></a></div>
The distribution includes a set of demonstrations:<br />
<ul>
<li>A common simple LED blink example to control all 3 hardware platforms.</li>
<li>A common tkinter remote control GUI for all 3 hardware platforms.</li>
<li>A Web Page for each hardware platform that provides Web based remote control for all 3 platforms.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDvHs2_ug4bdIWbWUr3Q5h0NusFy3372n8IBAIQXl7q-cIRRKwG37Felq-yqiHi5is5czVG3Dh3j-RliAHTi4ac5ME7YN-yQPClsP4e7GdchFXTvflXvR37ILcGTxXWF89Dj1KgJu0ML5N/s1600/tkinter_rpi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="637" data-original-width="800" height="508" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDvHs2_ug4bdIWbWUr3Q5h0NusFy3372n8IBAIQXl7q-cIRRKwG37Felq-yqiHi5is5czVG3Dh3j-RliAHTi4ac5ME7YN-yQPClsP4e7GdchFXTvflXvR37ILcGTxXWF89Dj1KgJu0ML5N/s640/tkinter_rpi.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW7noPVGueBO7x3sK_Es1rWqj4GtnqwpcG6TXrYb0xrjmW-6mRMvGau2k3Fmy48ssUO1_k6alb5gnIa1IOa-sh6_JU4KAT9tqvtfqiPHZAn-WjSJyJkSnAn9hDFOTomf4O0nOB8Rot5rBi/s1600/web_digital_input.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="770" data-original-width="1000" height="492" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW7noPVGueBO7x3sK_Es1rWqj4GtnqwpcG6TXrYb0xrjmW-6mRMvGau2k3Fmy48ssUO1_k6alb5gnIa1IOa-sh6_JU4KAT9tqvtfqiPHZAn-WjSJyJkSnAn9hDFOTomf4O0nOB8Rot5rBi/s640/web_digital_input.png" width="640" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
All the demos take advantage of the <b><a href="https://mryslab.github.io/python_banyan/#example8/" target="_blank">Banyan Launcher</a></b>, where from a single terminal window, all the Banyan components for a Banyan application are launched from a single command line.</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Lastly, python-banyan is being used Palace Games in San Francisco, as its communictions back-bone. You can read about that <a href="https://www.raspberrypi.org/blog/raspberry-pi-escape-room/" target="_blank">here</a>. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Please take a look at python-banyan and pymata-express and let me know what you think.</div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-81804818959925344262018-02-05T15:00:00.002-05:002018-02-05T15:01:33.731-05:00<h2 style="text-align: center;">
<span style="font-size: x-large;">Building An Inexpensive</span></h2>
<h2 style="text-align: center;">
<span style="font-size: x-large;">Robot With</span></h2>
<h2 style="text-align: center;">
<span style="font-size: x-large;">micro:bit</span></h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5LXAAeusPik60uIbSeUcQwetioIdprayiMxWbk_pdO14Q3zUa37zc0C2CdQzCW3fpz6xkGWLbCiG0UGD11nQBqqdtbFpA2i2jeLY-QVab3C-72aRgVbvcXdOqK-STt8rASl7HhxkM2jeC/s1600/robot.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="281" data-original-width="500" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5LXAAeusPik60uIbSeUcQwetioIdprayiMxWbk_pdO14Q3zUa37zc0C2CdQzCW3fpz6xkGWLbCiG0UGD11nQBqqdtbFpA2i2jeLY-QVab3C-72aRgVbvcXdOqK-STt8rASl7HhxkM2jeC/s640/robot.gif" width="640" /></a></div>
<div style="text-align: left;">
<span style="font-size: x-large;"> </span><span style="font-size: small;">I just released the <a href="https://mryslab.github.io/microbit-robot/" target="_blank">source code and a tutorial </a>on building a remote controlled robot using the micro:bit.</span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="font-size: small;">There are 4 different remote controllers included with this project, all using the micro:bit radio interface:</span></div>
<div style="text-align: left;">
<br /></div>
<ol>
<li><span style="font-size: small;">A micro:bit gesture based controller.</span></li>
<li><span style="font-size: small;">A <a href="https://github.com/dddomodossola/remi" target="_blank">remi</a> Web Page Controller. </span></li>
<li><span style="font-size: small;">A tkinter controller.</span></li>
<li><span style="font-size: small;">A SparkFun <a href="https://www.sparkfun.com/products/14215" target="_blank">gamer:bit </a>controller.</span></li>
</ol>
<br />
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com1tag:blogger.com,1999:blog-4642385059824018272.post-40231735806038126002018-01-21T11:16:00.001-05:002018-01-21T11:16:59.475-05:00<h2 class="separator" style="clear: both; text-align: center;">
<span style="font-family: inherit;"><span style="font-size: x-large;">A Python Library For The</span></span></h2>
<h2 class="separator" style="clear: both; text-align: center;">
<span style="font-family: inherit;"><span style="font-size: x-large;"><a href="https://www.sparkfun.com/products/14215" target="_blank">SparkFun gamer:bit Board </a></span></span></h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGxTVAi81oBvwaqjsmReIAWhYVQqVDrCVH0a5gdA5JKNRTe9Dek5-yA7Y50kQbgU4EBlNxD1Tdo-LKUlqoBWiADfzGpVwg5oDbrAi3UfApGBjpvWnrASC4VLIz_So1VWMzqCIw8GVy_r7m/s1600/gamer_bit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="164" data-original-width="452" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGxTVAi81oBvwaqjsmReIAWhYVQqVDrCVH0a5gdA5JKNRTe9Dek5-yA7Y50kQbgU4EBlNxD1Tdo-LKUlqoBWiADfzGpVwg5oDbrAi3UfApGBjpvWnrASC4VLIz_So1VWMzqCIw8GVy_r7m/s640/gamer_bit.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
I just <a href="https://github.com/MrYsLab/gamerbit" target="_blank">released a library</a> to control the <span style="font-size: small;">Spark Fun gamer:bit</span> for the micro:bit. The library supports all the buttons and "poke home" connectors on the back of the board. You can configure the library to report single or simultaneous button presses. Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-85213990861393327982018-01-18T13:10:00.000-05:002018-01-18T13:10:12.949-05:00<div class="separator" style="clear: both; text-align: center;">
</div>
<h2 class="separator" style="clear: both; text-align: center;">
<span style="font-family: inherit;"><span style="font-size: x-large;">A Python Library For The</span></span></h2>
<h2 class="separator" style="clear: both; text-align: center;">
<a href="https://www.kitronik.co.uk/5620-motor-driver-board-for-the-bbc-microbit-v2.html" target="_blank"><span style="font-family: inherit;"><span style="font-size: x-large;">Kitronik Motor Driver Board </span></span></a></h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahp4T0v8v-YK_ADiTVlLnAK92AdnGZCokfE0kpuU6nTbVVAcDWnxUZxM04UnMRhUxAS59a50-KPxu5hwzlB6_-HMuUW-WC6lrVWTvetN4ieyQYLO0MHomWbnmp_SzGR6BQ1gA__uCeELB/s1600/motor_board.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="400" data-original-width="400" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahp4T0v8v-YK_ADiTVlLnAK92AdnGZCokfE0kpuU6nTbVVAcDWnxUZxM04UnMRhUxAS59a50-KPxu5hwzlB6_-HMuUW-WC6lrVWTvetN4ieyQYLO0MHomWbnmp_SzGR6BQ1gA__uCeELB/s320/motor_board.png" width="320" /></a></div>
I just <a href="https://github.com/MrYsLab/kitronic_motor_board" target="_blank">released a library </a>to control the Kitronik Motor Driver Board. I selected this board over all others, mainly because it uses screw terminals that securely hold the motor and power wires in place. No more wires popping out due to motor vibration. It also has a breakout pad for the micro:bit pins, making it easy to add additional devices, like an ultrasonic distance sensor to the project.<br />
<br />
The board is extremely well made and works extremely well and is priced very appropriately. I had some questions about its use and received prompt and courteous service from the Kitronik's folks.<br />
<br />
I ordered the board from <a href="https://shop.pimoroni.com/" target="_blank">Pimoroni</a> and when it was first received I thought I had some issues with it. It turned out there were no issues with the board, but with the author. Because I thought I might have to return the board, I contacted Pimoroni and with patience and grace, they helped solve my issues. No return needed and I was able to quickly get to my latest project. Another great company to do business with!<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-20593338120301835732018-01-04T13:59:00.000-05:002018-01-04T13:59:11.418-05:00<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju1N5gwhOqMi7zn0_TdmFSgcjNT0nkoV5NjfLqMiI4paywmLBSLzprPxoNwElj8Ca4rDWxO4cYMEgIOPz8BjW-9y5HYuYm0O1ZDmzX_wCAFRZWr8T3RbyWLe2dv1iu9zOnKCmM1FmZG9MY/s1600/logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="206" data-original-width="713" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju1N5gwhOqMi7zn0_TdmFSgcjNT0nkoV5NjfLqMiI4paywmLBSLzprPxoNwElj8Ca4rDWxO4cYMEgIOPz8BjW-9y5HYuYm0O1ZDmzX_wCAFRZWr8T3RbyWLe2dv1iu9zOnKCmM1FmZG9MY/s640/logo.png" width="640" /></a></div>
<h2 style="text-align: center;">
<span style="font-size: x-large;">Using</span></h2>
<h2 style="text-align: center;">
<i><span style="font-size: x-large;">PyCharm</span></i></h2>
<h2 style="text-align: center;">
<span style="font-size: x-large;">To Program The</span></h2>
<h2 style="text-align: center;">
<i><span style="font-size: x-large;">micro:bit</span></i></h2>
<div style="text-align: left;">
<span style="font-size: x-large;"> <span style="font-size: small;">I just released a<a href="https://github.com/MrYsLab/pseudo-microbit" target="_blank"> package on GitHub</a> that will allow you to use PyCharm to program the micro:bit.</span></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="font-size: x-large;"><span style="font-size: small;">Check out the tutorial: <a href="https://mryslab.github.io/pseudo-microbit/" target="_blank">https://mryslab.github.io/pseudo-microbit/ </a></span></span></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-27608472658220617412017-12-09T14:21:00.001-05:002017-12-09T14:21:38.223-05:00<h2 style="text-align: center;">
<br /></h2>
<h2 style="text-align: center;">
<i>s2m</i> Is Featured On <a href="http://blog.champierre.com/1112" target="_blank">Champierre's Blog</a></h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEt8Q3n7PPmS8jGJblQfa5Lv3tGiqI4neJK3VwfxB3Dcajd7mC0z5u7nsvei1QN_hUaGZ6obdXFYyZC93KZeqh4qjXt3i-R2T_EZCxcjoaxSQKRjyXqgBGw26_pYYCJMUeukQNeMuAo_tb/s1600/Screenshot+from+2017-12-09+14-16-26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="252" data-original-width="885" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEt8Q3n7PPmS8jGJblQfa5Lv3tGiqI4neJK3VwfxB3Dcajd7mC0z5u7nsvei1QN_hUaGZ6obdXFYyZC93KZeqh4qjXt3i-R2T_EZCxcjoaxSQKRjyXqgBGw26_pYYCJMUeukQNeMuAo_tb/s640/Screenshot+from+2017-12-09+14-16-26.png" width="640" /></a></div>
<h2 style="text-align: center;">
<br /></h2>
<div style="text-align: left;">
<span style="font-size: small;">Champierre, who not only provided the Japanese translation for the s2m blocks, has featured s2m on his blog. Check it out!</span></div>
<div style="text-align: left;">
<span style="font-size: small;"><b><br /></b></span></div>
<div style="text-align: left;">
<span style="font-size: small;">Thanks Champierre<b><br /></b></span></div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinsaDmDzoOPkoQC1tHV89mr_pcLXmkdivr0dCDx-YxS4hHDgB2OK2X8Rv0RlVINsoWDVYWRSsZnKKmTstL2M9gRs2W7c4kNBG7D5vpEik0KbcN_L539S6nwbJlKTzbgLCc0idiG_JvMo0P/s1600/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588_2017-12-07_0.52.49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="416" data-original-width="600" height="442" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinsaDmDzoOPkoQC1tHV89mr_pcLXmkdivr0dCDx-YxS4hHDgB2OK2X8Rv0RlVINsoWDVYWRSsZnKKmTstL2M9gRs2W7c4kNBG7D5vpEik0KbcN_L539S6nwbJlKTzbgLCc0idiG_JvMo0P/s640/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588_2017-12-07_0.52.49.png" width="640" /></a></div>
<div style="text-align: left;">
<span style="font-size: small;"><b> </b></span></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-76856018826972931062017-12-08T15:37:00.000-05:002017-12-08T15:37:06.180-05:00<h2 style="text-align: center;">
<a href="https://github.com/MrYsLab/s2m" target="_blank">s2m</a> Translated Into Korean and Traditional (tw) Chinese</h2>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhixBjh8rU599iEweOOmBftKsLTwu7wCBU1oGFpcSWKgGP6eyRN9WaE1x7qrL3iRqQvvT5RSuZJVJc3hbrkDnYUH8TmjazbbZDhiRVGlniH0i3UAjOslFo3l_DShBkeJ9GW7OehyphenhyphenE6rS-iR/s1600/korean_blocks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="722" data-original-width="1086" height="424" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhixBjh8rU599iEweOOmBftKsLTwu7wCBU1oGFpcSWKgGP6eyRN9WaE1x7qrL3iRqQvvT5RSuZJVJc3hbrkDnYUH8TmjazbbZDhiRVGlniH0i3UAjOslFo3l_DShBkeJ9GW7OehyphenhyphenE6rS-iR/s640/korean_blocks.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijOkdWhjSj-shCW3S3ksceesSz1YSZGFe8lhc8lLWdN-Hlx955Ag0ycs7r0cva7Zl39p4FjyUSH5ly1SgMXI9lEKtxv0Lxu52MiOgHy57yKr8AcmwO2ZwDe3o8-i-3mms9EKLf0PZm27DP/s1600/taiwanese_blocks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="737" data-original-width="1091" height="432" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijOkdWhjSj-shCW3S3ksceesSz1YSZGFe8lhc8lLWdN-Hlx955Ag0ycs7r0cva7Zl39p4FjyUSH5ly1SgMXI9lEKtxv0Lxu52MiOgHy57yKr8AcmwO2ZwDe3o8-i-3mms9EKLf0PZm27DP/s640/taiwanese_blocks.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS_zREyoowUmA8QuM2AwJV-3m3loja4faXNmdXRXs1wLoZ0j2zgx9mMhuAmY7k4YbNxGnRUnodYNao8SnnaWd7kef4AkQVmaDyRUTq0-oRDU9JAMCF9SGe1VvixT2zq9v-ckkudYkx5rJf/s1600/tws_blocks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="798" data-original-width="1600" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS_zREyoowUmA8QuM2AwJV-3m3loja4faXNmdXRXs1wLoZ0j2zgx9mMhuAmY7k4YbNxGnRUnodYNao8SnnaWd7kef4AkQVmaDyRUTq0-oRDU9JAMCF9SGe1VvixT2zq9v-ckkudYkx5rJf/s640/tws_blocks.png" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Much thanks to <span style="background-color: #fcfcfc; color: #404040; font-family: "Roboto Slab", ff-tisa-web-pro, Georgia, Arial, sans-serif;">전형기 for providing the Korean translation and to </span><span style="background-color: #fcfcfc; color: #404040; font-family: "Roboto Slab", ff-tisa-web-pro, Georgia, Arial, sans-serif;">HSIEH, Li-Yi for providing the Traditional (tw) Chinese translation.</span></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-49277426812135584022017-12-01T10:45:00.000-05:002017-12-01T10:47:36.721-05:00<h2 style="text-align: center;">
s2m</h2>
<h2 style="text-align: center;">
Translated To Japanese</h2>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUF5yYYLuk2qOcx7bhdRYWYHQ-OjchsGJw-DOdCVNhtnsvS7_LasRuDdnRjZWT7wLsQolFa7WhXLtt0HfiaDBOJfA1uHJx2Et-awUkBx3AO1AonGT0qNb24cwe9yRjF9NWO156OVMoEKBe/s1600/japanese_blocks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="769" data-original-width="1079" height="456" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUF5yYYLuk2qOcx7bhdRYWYHQ-OjchsGJw-DOdCVNhtnsvS7_LasRuDdnRjZWT7wLsQolFa7WhXLtt0HfiaDBOJfA1uHJx2Et-awUkBx3AO1AonGT0qNb24cwe9yRjF9NWO156OVMoEKBe/s640/japanese_blocks.png" width="640" /></a></div>
<div>
<br /></div>
<div>
<span style="font-family: inherit;">Thanks to <span style="background-color: #fcfcfc; color: #404040;">Junya Ishihara, </span><b><i><a href="https://github.com/MrYsLab/s2m" target="_blank">s2m</a></i></b>, the Scratch to micro:bit bridge, <span style="background-color: #fcfcfc; color: #404040;">has been translated </span>into<span style="background-color: #fcfcfc; color: #404040;"> Japanese. Thank </span>you<span style="background-color: #fcfcfc; color: #404040;">, Junya!</span></span></div>
<div>
<span style="background-color: #fcfcfc; color: #404040; font-family: inherit; font-size: 16px;"><br /></span></div>
<div>
<span style="background-color: #fcfcfc; color: #404040; font-family: inherit; font-size: 16px;">If you would like to translate s2m into <i>your</i> native language, you can find out how to do it in the <a href="https://mryslab.github.io/s2m/translation/" target="_blank">User's Guide</a>.</span></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-60127436958848991242017-11-20T16:54:00.001-05:002017-11-20T16:54:05.470-05:00<h2 style="text-align: center;">
Scratch 2.0 Extension For The micro:bit Just Published</h2>
<h2 style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiug4KUpyztpB7ukY9Xo2Wr4b1osOYs-KanGBxP43La4XJcknT-mr2vH6wG6c74lbmHIOM-RSqk0HkZzt1yvRQFBNHHUE_DHR45lhRNNtVDVBrZyPYCiEqsF9W4jjb1hMhB75d8Zk9rDwWf/s1600/launch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="784" data-original-width="1010" height="496" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiug4KUpyztpB7ukY9Xo2Wr4b1osOYs-KanGBxP43La4XJcknT-mr2vH6wG6c74lbmHIOM-RSqk0HkZzt1yvRQFBNHHUE_DHR45lhRNNtVDVBrZyPYCiEqsF9W4jjb1hMhB75d8Zk9rDwWf/s640/launch.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: small;"><span style="font-weight: normal;">I just published a new Scratch 2.0 extension for the micro:bit computer. It's called</span> <i>s2m </i><span style="font-weight: normal;">and can be found on <a href="https://github.com/MrYsLab/s2m" target="_blank">Github</a>. A User's Guide is also <a href="https://mryslab.github.io/s2m/" target="_blank">available</a>.</span></span></div>
</h2>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-65152506162819862692017-08-02T07:51:00.000-04:002017-08-02T07:51:02.870-04:00<h2 style="clear: both; text-align: center;">
<span style="font-size: x-large;">Electronic Playground With Arduino and Scratch 2</span></h2>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAsTuH8kXisk4G7He3h_tCo-Vokw7n9Aty5jopm2nfCcH6DydmE61ohudHlcZJdPwN8RqOnwWuyBI7GsIYPt6grBJvYEz5gFwgD-raJuUoDyJaE3_dIGaZyYB2LIU4Yj1JoFD_Id5nBGWe/s1600/FWZJUX2J5OD6OQ7.MEDIUM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="465" data-original-width="620" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAsTuH8kXisk4G7He3h_tCo-Vokw7n9Aty5jopm2nfCcH6DydmE61ohudHlcZJdPwN8RqOnwWuyBI7GsIYPt6grBJvYEz5gFwgD-raJuUoDyJaE3_dIGaZyYB2LIU4Yj1JoFD_Id5nBGWe/s640/FWZJUX2J5OD6OQ7.MEDIUM.jpg" width="640" /></a></div>
<br />
Marcelo Ravai just published a wonderful <a href="https://www.instructables.com/id/Electronic-Playground-With-Arduino-and-Scratch-2/" target="_blank">Instructables</a> and a <a href="https://www.hackster.io/mjrobot/electronic-playground-with-arduino-and-scratch-2-aaa53e">hackster.io</a> article on creating physical computing projects using <a href="https://github.com/MrYsLab/s2aio">s2aio</a> and <a href="https://scratch.mit.edu/">Scratch</a>. He demonstrates how to control LEDs, switches, a passive infrared (PIR) sensor, servos, buzzers, ultrasonic distance sensors, temperature sensors, servo motors, temperature sensors and light sensors.<br />
<br />
The article provides links to the Scratch code for all of the projects. In addition, Marcello provides detailed wiring instructions, making it easy to quickly get up and running.<br />
<br />
Check it out for some great summer fun!Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-49832378590049362572017-07-23T12:03:00.000-04:002017-07-23T12:03:40.577-04:00<h2 style="text-align: center;">
<span style="font-size: x-large;">C4 Labs Review</span></h2>
<h2 style="text-align: center;">
<span style="font-size: large;">Zebra Black Ice Case For The Raspberry Pi</span></h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtl6LISOf6CkSD5-u3BAqQjFxfTmSS6d1awWfnir9oIS7qMtrXySPbqvFbQ0NOcY9Eljd2w67-_iijw2ANZMvWRJsbd6mVI8AgsAmwrxrCTGo0XQQ2VXlwtARBEZjI02D5ScfwpZqauHgw/s1600/MG_0856_grande.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="455" data-original-width="600" height="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtl6LISOf6CkSD5-u3BAqQjFxfTmSS6d1awWfnir9oIS7qMtrXySPbqvFbQ0NOcY9Eljd2w67-_iijw2ANZMvWRJsbd6mVI8AgsAmwrxrCTGo0XQQ2VXlwtARBEZjI02D5ScfwpZqauHgw/s640/MG_0856_grande.jpg" width="640" /></a></div>
<div style="text-align: left;">
My latest <a href="https://github.com/MrYsLab/python_banyan" target="_blank">open source efforts </a>have been almost exclusively devoted to the Raspberry Pi. Over the years I have developed a strong affinity for this little powerhouse of a computer, but was never particularly pleased with the choices for housing the unit. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I have gone from no housing at all, just letting it sit on my lab bench, to trying several of the inexpensive ABS cases available on the market. I was never pleased with any of these choices. The "naked bench top" approach always left the computer exposed to mayhem, and the ABS cases never fit quite correctly, making installing and removing the SD cards difficult, not to mention removing the board from the cases, an exercise in frustration.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So I went on a quest for a quality case and found the <b><a href="https://c4labs.net/" target="_blank">C4 Labs</a></b> family of products. I purchased a Zebra Black Ice case and was immediately impressed with both the physical design and the design aesthetics. You do have to assemble the case, which takes about 10 minutes, but it is well worth the effort. The case not only provides substantial protection for the RPi, but is truly a thing of beauty. Its rounded corners, and color accent make me<i style="font-weight: bold;"> smile</i> each time I see or pick up the case. That is not something I had ever gotten from working with the RPi before.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The case comes with a set of heat sinks, as well as a set of soft feet. It allows access to GPIO pins, the DSI display connector and CSI camera connector. It provides for air flow on both the top and bottom, and has holes for screw mounting the case if desired.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
If that wasn't enough, C4 Labs provides wonderful, personal, customer service. I had some questions and not only were they answered and resolved quickly, but C4 Labs went over and beyond to make sure that I was satisfied. This is a rare thing these days.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I highly recommend this case for its protection, design integrity, quality construction, and aesthetics. If you too want to smile when you use your RPi, check out C4 Labs cases.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
NOTE: I am not an employee of C4 Labs, nor have they solicited for this review, I am just one happy customer.</div>
<div style="text-align: left;">
<br /></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-20340906832577592862017-06-29T13:24:00.000-04:002017-06-29T13:24:30.563-04:00<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1xXugHa-tVgWElfVGv5fkutEes1vAuFUTUS96lkGLiD6pB4dv9QlSC5d2lUy9eviqLTvgfTXieWgg7B1jS32vkgUb0Ck7NZ1_i7_95djDrHXJO5dYU3tfjRjesywpvDgXDA3uR6kH4QMd/s1600/logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="304" data-original-width="761" height="254" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1xXugHa-tVgWElfVGv5fkutEes1vAuFUTUS96lkGLiD6pB4dv9QlSC5d2lUy9eviqLTvgfTXieWgg7B1jS32vkgUb0Ck7NZ1_i7_95djDrHXJO5dYU3tfjRjesywpvDgXDA3uR6kH4QMd/s640/logo.png" width="640" /></a></div>
<br />
<h2>
<span style="font-size: x-large;">The Documentation For s2-pi has been updated and can be found here:</span></h2>
<div style="text-align: center;">
<span style="font-size: x-large;"><a href="https://mryslab.github.io/s2-pi/">https://mryslab.github.io/s2-pi/</a></span></div>
<div>
<span style="font-size: x-large;"><br /></span></div>
<h2>
<span style="font-size: x-large;">To install the demo code either type:</span></h2>
<h2 style="text-align: center;">
<span style="font-size: x-large;">sudo pip3 install s2-pi</span></h2>
<div>
<span style="font-size: x-large;"><br /></span></div>
<h2>
<span style="font-size: x-large;">Or</span></h2>
<div style="text-align: center;">
<span style="font-size: x-large;"><a href="https://github.com/MrYsLab/s2-pi" target="_blank">Download From Github.</a></span></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-23885223998933505212017-04-04T09:42:00.000-04:002017-04-04T09:46:23.585-04:00<h2 style="text-align: center;">
<span style="font-size: x-large;"><a href="https://smarticase.com/" target="_blank">The SmartiPi Touch</a></span></h2>
<h3 style="text-align: center;">
A Versatile, <i>Five Star</i> Solution For Mounting The Raspberry Pi Touch Display</h3>
<h3 style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvzAKo7j7w-I5dACP3N98-l-MdH7vcZm25v6kBTosSDzkuk7WtpiBMul8ejYbdkdwpLfJHaFYtiHp-RC35tQlr-sewZHcDBPWokjsb45l95Qkt1UYqL98XxxEWpOcLZ40LGGjSEGkbzPua/s1600/spicase.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvzAKo7j7w-I5dACP3N98-l-MdH7vcZm25v6kBTosSDzkuk7WtpiBMul8ejYbdkdwpLfJHaFYtiHp-RC35tQlr-sewZHcDBPWokjsb45l95Qkt1UYqL98XxxEWpOcLZ40LGGjSEGkbzPua/s640/spicase.png" width="640" /></a></div>
</h3>
<div>
Recently I purchased a <a href="https://www.raspberrypi.org/blog/the-eagerly-awaited-raspberry-pi-display/" target="_blank">Raspberry Pi touch display</a> and quickly came to the realization that I needed a way to easily position and protect the display on my desk. Before checking out the various cases, I came up with the following list of must haves: </div>
<div>
<ul>
<li>Good design using highest quality components</li>
<li>Simple to assemble.</li>
<li>Be able to house my Raspberry Pi.</li>
<li>Does not require image positioning adjustment to fit the needs of the case.</li>
</ul>
</div>
<div>
After checking out all the cases available I found only one that checked all of the boxes, and that was the SmartiPi Touch case. It was breeze to assemble, holds my Raspberry Pi, is constructed of high quality materials and orients the screen in its natural position without having to diddle with rotating the image 180 degrees (some cases require you to do that!).</div>
<div>
<br /></div>
<div>
In addition, the SmartiPi case includes a Raspberry Pi camera case that mounts onto the main case using a Lego compatible bracket. Last week, I wanted to mount the camera on the case, only to realize that I did not have the appropriate bracket. I contacted SmartiPi to see what type of Lego bracket I needed to get. They informed me that I should have received one in the kit of parts. and promptly sent one to me, free of charge.</div>
<div>
<br /></div>
<div>
With the quality of product and quality of customer service, SmartiPi is truly five star.</div>
<div>
<br /></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-37773831110165507702017-02-08T15:00:00.000-05:002017-02-09T12:43:56.985-05:00<h2 style="text-align: center;">
Python Banyan Has Been Released!</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLXKIM9TKeXZrtUjM20SkJUQ-IseANYbuCznKwWPPcnUNYFNVgqKh25pz94ymyrnAr8hBR6k6hI3Uz_eZScjtwgOKUCSNrSCkLsiCsRQG13COzbeXNFhSFP_HAA-UBzn0MPSvs6OS3vKqY/s1600/bcd_clock.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLXKIM9TKeXZrtUjM20SkJUQ-IseANYbuCznKwWPPcnUNYFNVgqKh25pz94ymyrnAr8hBR6k6hI3Uz_eZScjtwgOKUCSNrSCkLsiCsRQG13COzbeXNFhSFP_HAA-UBzn0MPSvs6OS3vKqY/s640/bcd_clock.png" width="640" /></a></div>
<div>
<br /></div>
<div>
I am pleased to announce the initial release of the Python Banyan Framework. The <a href="https://mryslab.github.io/python_banyan/" target="_blank">Python Banyan User's Guide</a> explains how to create and run a Python Banyan application. Many of the examples operate in a standalone fashion, without the need of a Raspberry Pi or Arduino, but there are also examples demonstrating GPIO control, such as the Raspberry Pi driven BCD Clock display, pictured above.</div>
<div>
<br /></div>
<div>
The framework is currently Python 3 compatible only, and will run on Windows, Linux and the Mac.</div>
<div>
<br /></div>
<div>
<b>So What Is Python Banyan?</b></div>
<div>
<br /></div>
<div>
<div style="box-sizing: border-box; color: #333333; margin-bottom: 16px;">
<span style="font-family: inherit;">Python Banyan is a lightweight, reactive framework used to create flexible, non-blocking, event driven, asynchronous applications. It was designed primarily to implement physical computing applications for devices such as the Raspberry Pi and Arduino, but it is not limited to just that domain, and may be used to create application in any domain.</span></div>
<div style="box-sizing: border-box; color: #333333; margin-bottom: 16px;">
<span style="font-family: inherit;">Most traditional physical computing libraries or frameworks use an <em style="box-sizing: border-box;">object oriented</em> model that results in a single, tightly coupled, monolithic executable image. Python Banyan uses an extension of the object oriented model, called the <em style="box-sizing: border-box;">component based</em> model. A component based application is comprised of a set of independent, loosely coupled modules. Functionality is easily added to a Python Banyan application, and in fact it may be added to a fully running system without the need to recompile or reboot.</span></div>
<div style="box-sizing: border-box; color: #333333; margin-bottom: 16px;">
<span style="font-family: inherit;">Because each module is a self contained entity, applications can be created with a set of modules that use different versions of Python, and in fact, you can even add modules written in other computer languages.</span></div>
<div style="box-sizing: border-box; color: #333333; margin-bottom: 16px;">
<span style="font-family: inherit;">In addition, the modules may be run on a single computer, or may be distributed across multiple computers running different operating systems, without having to change a single line of code.</span></div>
</div>
<div>
<b>Where Can You Find Python Banyan?</b></div>
<div>
<b><br />
</b></div>
<div>
Python Banyan is located in its own Github repository and may be found <a href="https://github.com/MrYsLab/python_banyan" target="_blank">here</a>.</div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-71443013019783738922017-01-20T19:46:00.000-05:002017-01-20T19:46:20.935-05:00<br />
20 January 2017<br />
<br />
<h2 style="text-align: center;">
<span style="font-size: x-large;">What Have I Been Doing Lately?</span></h2>
<div>
My last posting was in October of 2016, and since then I have been working on moving the code and lessons I learned from the razmq project to a new project called <b>Python Banyan.</b> The code has been complete for some time now, but I have been struggling to get it documented. I am pleased to say that the documentation is well under way and hopefully will be complete in about 2 weeks time (hopefully shorter). You can view a draft of the <a href="https://github.com/MrYsLab/python_banyan_guide/blob/master/docs/index.md" target="_blank">User's Guide here,</a> but be mindful it is subject to change. </div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<h2 style="border-bottom: 1px solid rgb(238, 238, 238); box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;">
WHAT IS PYTHON BANYAN?</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5VbSAgp3ukP53N1bnL2CLDRdRcIIWFUueXE871rFghwz8H4jSWsF_zJh8Wgl-HJKu2mN9mMdpccyFlN1AXHKHtRkc1AmmpSEn7KSWOQ4-C95ZPJf_6lM_cxtsKVbetykM6WLB0GIOdJLK/s1600/BanyanTree.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5VbSAgp3ukP53N1bnL2CLDRdRcIIWFUueXE871rFghwz8H4jSWsF_zJh8Wgl-HJKu2mN9mMdpccyFlN1AXHKHtRkc1AmmpSEn7KSWOQ4-C95ZPJf_6lM_cxtsKVbetykM6WLB0GIOdJLK/s1600/BanyanTree.png" /></a></div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
Python Banyan is a lightweight, reactive framework used to create flexible, non-blocking, event driven, asynchronous applications. It was designed primarily to implement physical computing applications for devices such as the Raspberry Pi and Arduino, but it is not limited to just that domain, and may be used to create application in any domain.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
Most traditional physical computing libraries or frameworks use an <em style="box-sizing: border-box;">object oriented</em> model that results in a single, tightly coupled, monolithic executable image. Python Banyan uses an extension of the object oriented model, called the <em style="box-sizing: border-box;">component based</em> model. A component based application is comprised of a set of independent, loosely coupled modules. Functionality is easily added to a Python Banyan application, and in fact it may be added to a fully running system without the need to recompile or reboot.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
Because each module is a self contained entity, applications can be created with a set of modules that use different versions of Python, and in fact, you can even add modules written in other computer languages.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
In addition, the modules may be run on a single computer, or may be distributed across multiple computers running different operating systems, without having to change a single line of code.</div>
<h2 style="border-bottom: 1px solid rgb(238, 238, 238); box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;">
<a aria-hidden="true" class="anchor" href="https://github.com/MrYsLab/python_banyan#a-little-more-detail" id="user-content-a-little-more-detail" style="box-sizing: border-box; color: #4078c0; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration: none;"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"></path></svg></a><em style="box-sizing: border-box;">A Little More Detail</em></h2>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
The Python Banyan Framework consists of a single, simple base class. All Banyan compatible components inherit from this class. When a Banyan component is first invoked, it automatically connects to a common shared software backplane. All of the complexity of managing connections is hidden within and handled by the base class. All Banyan modules exchange information with each another by sending or publishing user defined protocol messages via the backplane. All routing and message buffering is automatically handled by the Framework. Each Banyan component can "publish" messages, "subscribe" to receive specific messages or both publish and subscribe messages. A Banyan component is not limited as to how many types of messages it may subscribe to.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
Because Banyan messages are not computer language specific, components written in other computer Languages, such as JavaScript, can be used within a Python Banyan application. A simple JavaScript demo is provided in the examples section below.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
Python Banyan takes full advantage of the <a href="http://zeromq.org/" style="box-sizing: border-box; color: #4078c0; text-decoration: none;">ZeroMQ</a> networking library that not only provides connectivity, but in addition acts as a concurrency framework. All of this is handled transparently by the Python Banyan base class. If your application requires additional concurrency support, you are free to choose whatever works best for your application, such as a multi-threading or a Python asyncio approach. User defined messages are prepared for transport across the network by wrapping them in the<a href="http://msgpack.org/index.html" style="box-sizing: border-box; color: #4078c0; text-decoration: none;">Message Pack format.</a></div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
The complexities of MessagePack are handled transparently by the base class, both for transmitting and receiving messages.</div>
<h3 style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 1.25em; line-height: 1.25; margin-bottom: 16px; margin-top: 24px;">
<a aria-hidden="true" class="anchor" href="https://github.com/MrYsLab/python_banyan#a-users-guide-is-provided-here-is-what-the-guide-covers" id="user-content-a-users-guide-is-provided-here-is-what-the-guide-covers" style="box-sizing: border-box; color: #4078c0; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration: none;"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"></path></svg></a>A User's Guide Is Provided. Here is what the guide covers:</h3>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
Chapter 1 is an introduction to developing with Python Banyan. An application tailored specifically for this purpose will be presented in detail.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
In chapter 2, a demonstration of, and a discussion about creating physical computing components with Python Banyan.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
To demonstrate Python Banyan's flexibility, applications will be built from Python 2 components, Python 3 components and even a JavaScript component, all cooperating and communicating with each other within a single Python Banyan application.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
Python Banyan applications may be distributed across multiple computers, all without changing a single line of code. Using the components created in this guide, all of the components will first be launched to run on a Raspberry Pi, and then then the components will be re-distributed across a Linux Unbuntu PC, a Windows PC and the Raspberry Pi without having to change a single line of code.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
In Chapter 3, we will add components to control an 8x8 bicolor LED matrix connected to a Raspberry Pi. A demonstration of using Python Banyan to control an i2c device will be presented.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
If you need to control multiple i2c devices sharing the same i2c pins, Python Banyan provides the concurrency support for you to do so.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
Chapter 4 will discuss how to use Python's setup tools to convert a Banyan component into an executable file and have it automatically installed on the execution path.</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-51802805044966603592016-10-02T11:36:00.000-04:002016-10-02T14:38:29.321-04:00<div style="text-align: left;">
<span style="font-size: large;">2 October 2016</span></div>
<div style="text-align: left;">
<span style="font-size: large;"><br /></span></div>
<h2 style="text-align: center;">
<span style="font-size: x-large;">Writing The Software To Control The Raspberry RedBot </span></h2>
<h2 style="text-align: center;">
<span style="font-size: x-large;">Part 2</span></h2>
<div style="text-align: left;">
<span style="font-weight: normal;">I have completed the bulk of the coding for <a href="https://github.com/MrYsLab/razmq" target="_blank"><i>razmq</i></a> and the results are in!</span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<span style="font-weight: normal;">I wanted to share this information now. The code will be published in a short while, after some cleanup and additional testing.</span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><br /></span></div>
<div>
The following screen shots were taken on a Raspberry Pi 3 running the latest Raspbian image, <i><a href="https://www.raspberrypi.org/downloads/raspbian/" target="_blank">Raspbian Jessie with Pixel</a></i>. </div>
<div>
<br /></div>
<div>
The first is "quiescent" mode. The <a href="http://abyz.co.uk/rpi/pigpio/" target="_blank">pigpio</a> daemon, <i>pigpiod, </i> the <i><a href="http://www.xrdp.org/" target="_blank">xrdp</a> </i> daemon and <a href="https://hisham.hm/htop/" target="_blank"><i>htop</i></a> are running.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEDPElniiBA5tT03o1OEoXoEDDyJlZ6BzEC4sbJx_S7KJQkk9ZLS_ksP-bL47KTF4dNYla8mzyANoBmSS5YCWCahdrtzn3zNe7yc_vLK5Mwb-IDKfnpZVffcBYMFalP3mAcrjmehn98TDl/s1600/Screenshot+from+2016-10-02+09-54-57.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEDPElniiBA5tT03o1OEoXoEDDyJlZ6BzEC4sbJx_S7KJQkk9ZLS_ksP-bL47KTF4dNYla8mzyANoBmSS5YCWCahdrtzn3zNe7yc_vLK5Mwb-IDKfnpZVffcBYMFalP3mAcrjmehn98TDl/s640/Screenshot+from+2016-10-02+09-54-57.png" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div style="text-align: left;">
CPU utilization is at 4.2% and Memory utilization is 129 of 925 MB. CPU utilization varies and can go as high as 6.1% for this scenario.<br />
<br />
Starting all the processes that monitor and control the Raspberry RedBot we see the following:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6slYHnx-fcVGN9UIExhNp5FjHNcKzfwSDjJ9xK1bdN9hC6znA26qxVQDIrXpjOE_t5ECH7rzidsJewo0aljYA95c14Zs9M1FiBH4mbJeQ5wnM53GCl7Mx6fwPxNTs5hBNPhWDU_pRJb3f/s1600/Screenshot+from+2016-10-02+10-00-45.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="376" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6slYHnx-fcVGN9UIExhNp5FjHNcKzfwSDjJ9xK1bdN9hC6znA26qxVQDIrXpjOE_t5ECH7rzidsJewo0aljYA95c14Zs9M1FiBH4mbJeQ5wnM53GCl7Mx6fwPxNTs5hBNPhWDU_pRJb3f/s640/Screenshot+from+2016-10-02+10-00-45.png" width="640" /></a></div>
<br />
CPU utilization rises to 6.4% and Memory utilization is 294 of 925 MB. CPU utilization varies from about 4.5 to 6.5%.<br />
<br />
The Accelerometer (ADXL345) and the 3 Line Followers (PCF8591) are continuously streaming data via i2c in this scenario.<br />
<br />
Finally, we run the motors at full speed. This causes the encoders to add their streaming information into the mix. The motors at full speed run at 140 RPM. Each encoder sensor generates 192 "ticks" with each wheel revolution. Since this level of resolution was not necessary for the purposes of this project, the number of ticks was throttled by a factor of 6. So now each wheel revolution is limted to generating 32 "tick" notifications per wheel (but 192 are still being generated). This yields a 1/8 inch or 3.175 mm distance resolution that is reported on the GUI screen. Here are the results when the motors are running full speed and all other sensors and actuators are active:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjptur8v5Ild-cL7gCzmgZ0n1-50gW4CB9hUa0mFIgJxNwmQ0ZLaefY_C3sb-X7EiD67awoAgdd6wO3RhIRz6lI2Kinem-rayy1NynYkd2vxbwadgNG4RjDQ5O8xsLl8_TtPPJXNeiRFRZM/s1600/Screenshot+from+2016-10-02+10-16-46.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjptur8v5Ild-cL7gCzmgZ0n1-50gW4CB9hUa0mFIgJxNwmQ0ZLaefY_C3sb-X7EiD67awoAgdd6wO3RhIRz6lI2Kinem-rayy1NynYkd2vxbwadgNG4RjDQ5O8xsLl8_TtPPJXNeiRFRZM/s640/Screenshot+from+2016-10-02+10-16-46.png" width="640" /></a></div>
<br />
CPU utilization varies from about 16% to 26% and there is no additional memory utilization while the motors are running.<br />
<br />
Here is a screen shot of the <a href="https://kivy.org/#home" target="_blank"><i>Kivy</i></a> based GUI running on my Ubuntu based desktop PC.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtPuGVCj_8MCw_LUFxZADYVYmp67lLymvXUhIqQaAepvfcr8dicjToUSvf3lHlUxFxstDdvEP0OCCgH2li30xSAx7FkcolFWZhtVRj9c3ULXB6LSVuBX45WBIeVvq9S8SYHsrDgqDRdxlq/s1600/Screenshot+from+2016-10-02+10-17-10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="502" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtPuGVCj_8MCw_LUFxZADYVYmp67lLymvXUhIqQaAepvfcr8dicjToUSvf3lHlUxFxstDdvEP0OCCgH2li30xSAx7FkcolFWZhtVRj9c3ULXB6LSVuBX45WBIeVvq9S8SYHsrDgqDRdxlq/s640/Screenshot+from+2016-10-02+10-17-10.png" width="640" /></a></div>
<br />
Let's summarize what is running when the "motor run" numbers were captured:<br />
<br />
<ol>
<li>Data is continuously being streamed by the accelerometer, 3 line followers and 2 wheel encoders.</li>
<li>All other actuators (LED, Buzzer) and sensors (Push Button Switch, two mechanical bumpers) are ready to be activated or provide reports in a non-blocking fashion.</li>
<li>There are currently 12 separate processes running to monitor and control the Raspberry RedBot.</li>
</ol>
<h3>
Some Important Facts About The Framework Used to Create <i>razmq</i></h3>
<div>
<ol>
<li>Everything is written using Python 3.4.2, the version that comes with the Raspberry Pi image.</li>
<li>All processes are activated using the lunch process launcher - simplifies the start up process.</li>
<li>Processes may be started, stopped, added and removed at will, with no system crashes. Effectively providing a software backplane with hot swapping capabilities.</li>
<li>Most of the processes were built using a base class that encapsulates and hides the complexities (and there really are very little) of ZeroMQ and MessagePack.</li>
<li>For the purposes of this article, all processes, with the exception of the GUI, were run on a single Raspberyy Pi 3. However, during development some processes were run on a Pycharm IDE in Ubuntu on my desktop. The pigpio dependent processes were remotely debugged using the same PyCharm session. </li>
<li>Without any coding changes, any process may be run on any computer residing on a single LAN.</li>
<li>Module interfaces are defined as language independent protocol messages. The messages are asynchronously published to the network and may be subscribed to by any other process. This is done by transporting the MessageQueue messages using ZeroMQ. The result of using this mechanism is a simplified, non-blocking IPC (inter process communication) scheme with no data needed to be protected or locked. A lot more about this will also follow in a future article.</li>
<li>The system is totally non-blocking without the need of mechanisms like the Python asyncio or threading or multiprocessing modules.</li>
<li>Testing new modules is easy to do. Their published protocol messages may be observed in real-time using a simple monitor process. Building drivers for these modules is also quick and easy as a result of using the encapsulation base class (more on this will follow in future articles as well).</li>
<li>All modules use a consistent and common coding pattern.</li>
</ol>
<h3>
So What Does This All Mean?</h3>
</div>
<div>
The razmq project was built for a specific set of hardware actuators and sensors. However, the framework is easily adaptable to be used for other projects. New features can easily be added to existing projects and enabled on an already executing system. New projects can be created using a simple and consistent coding pattern.</div>
<div>
<br /></div>
<div>
The next several articles will explain in detail how razmq works and how you can use its framework in your own projects. </div>
<div>
<br /></div>
<div>
Stay tuned!</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-19220093455445711672016-09-18T14:44:00.000-04:002016-10-02T14:38:10.640-04:00<div style="text-align: center;">
<h2>
<span style="font-size: x-large;">Writing The Software To Control The Raspberry RedBot</span></h2>
<div>
<span style="font-size: x-large;"><br /></span></div>
<div style="text-align: left;">
<br />
18 September 2016<br />
<br />
<br />
Now that the <a href="http://mryslab.blogspot.com/2016/09/9-september-2016-its-alive-brain.html" target="_blank">hardware has been completed and is in place</a>, it is time to start writing the software. When working on a new project I like to take a <a href="https://en.wikipedia.org/wiki/Mise_en_place" target="_blank">"<b><i>Mise en place</i></b>"</a> approach - that is getting everything organized and in place and ready to go. First I create a Github page for the project and update the Wiki pages as the project progresses. For this project, I created a Github repository called <a href="https://github.com/MrYsLab/razmq" target="_blank">razmq</a>. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Next, I identify any additional software packages I might need and install them. The additional software requirements for razmq are identified <a href="https://github.com/MrYsLab/razmq/wiki/Installing%20Required%20Additional%20Software" target="_blank">here</a>. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
After that, I write a set of routines to exercise the hardware.- a <a href="https://github.com/MrYsLab/razmq/tree/master/hardware_baseline" target="_blank">hardware baseline</a> so to speak. In this way, I am able to verify hardware functionality at any time.<br />
<br />
<h3>
An Experimental Software Architectural Approach</h3>
<div>
As I have done in several of my previous projects, Python 3 will be used. I believe it is better to look towards the future of the language rather than have to worry about maintaining the legacy of Python 2. </div>
<div>
<br /></div>
<div>
I will still maintain an asynchronous event driven design approach, however, I would like to simplify things and provide concurrency without the use of either the <i>Python asyncio </i>module or the <i>threading module</i>. To do this, I will be dividing support for a given hardware functionality into 2 separate processes. The first process will present a "user" view of the hardware. For example, for motor control, this process will describe motor motion in abstractions such as direction and speed. These abstractions will be translated into <a href="http://msgpack.org/index.html" target="_blank">MessagePack</a> messages and then "published" using the <a href="http://zguide.zeromq.org/" target="_blank">ZeroMQ</a> publisher/subscriber pattern. Another process will be created and it will be a subscriber for these messages. It will translate the abstractions into <a href="http://abyz.co.uk/rpi/pigpio/" target="_blank">pigpio</a> calls to directly control a motor controller device. In this way, I can maintain an abstract view of the world and swap in specific hardware at any time to implement that abstraction.</div>
<div>
<br /></div>
<div>
To simplify the networking connections between all of these processes, a ZeroMQ forwarder will be used. The forwarder uses a "well-known" IP address/port for all publishers to publish their messages, and another "well-known" IP address/port for subscribers to subscribe to receive messages. There are no configuration files to maintain and each process uses a consistent methodology to both publish and subscribe to messages. To make the coding easier, a base class will be provided to encapsulate many of the ZeroMQ and MessagePack details. This base class can be inherited by the classes that provide either the user or hardware view of the system. </div>
<div>
<br /></div>
<div>
The experimental part of this exercise is to determine if the memory and CPU utilization is viable while having multiple concurrent processes running.</div>
<div>
<br /></div>
<div>
If this all seems a little abstract, in my next posting I will be describing the details of supporting a simple hardware device, the LED, using these methods. Hopefully that will demystify the described approach. It really is simpler than it sounds and provides a very flexible development environment.</div>
<div>
<br /></div>
<div>
Until next time ....</div>
</div>
</div>
<div>
<ul><ul>
</ul>
</ul>
</div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-78180493092042744102016-09-09T07:41:00.000-04:002016-10-02T14:37:48.787-04:009 September 2016<br />
<br />
<h2>
<div style="text-align: center;">
<span style="font-size: x-large;">It's Alive!</span></div>
<div style="text-align: center;">
<span style="font-size: x-large;"><br /></span></div>
<div style="text-align: center;">
<span style="font-size: x-large;">Brain Transplant A Success.</span></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-weight: normal;">I've successfully replaced the original Arduino based processor board that comes with the <a href="https://www.sparkfun.com/products/12649" target="_blank">RedBot</a> with a Raspberry Pi 3.</span></span></div>
<div style="text-align: left;">
<span style="font-size: small; font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<span style="font-size: small; font-weight: normal;">It looks like a chaotic mess of wires, but is actually quite organized, and no GPIO pins were harmed in the process. A <a href="https://www.amazon.com/gp/product/B01FE9EQ88/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1" target="_blank">Pi Ez-Connec</a>t was used so that I can easily remove the Pi and use it in another project at any time. All solder connections were made on a <a href="https://www.sparkfun.com/products/12070" target="_blank">solderable breadboard</a>, so the Ez-Connect can be reused as well.</span><br />
<span style="font-size: small; font-weight: normal;"><br /></span>
<span style="font-size: small; font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhztZHvjsI2tKWlJz6jEEG4WCeQsfad_6pf3Amt7BLiGTob8hD3K7IZobR1xr2wmP5VxBn73qpmWzCeJOzI0_KVy8xAcEmLxezFUG56EckY6khPfneLcBa6BTsTBcJH4EAyh2UbkkTj07Hm/s1600/IMG_0065.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhztZHvjsI2tKWlJz6jEEG4WCeQsfad_6pf3Amt7BLiGTob8hD3K7IZobR1xr2wmP5VxBn73qpmWzCeJOzI0_KVy8xAcEmLxezFUG56EckY6khPfneLcBa6BTsTBcJH4EAyh2UbkkTj07Hm/s320/IMG_0065.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS4u7ql6mrGHlhsCgfNMIao6CNKRrcVngeECgAjQFtyVrZ5UOBxki-SO-4P2uPv6mlkQy_WsC1dp0QgUxIYv4whLRKefm-r51CAmWs7-b6Tmvr9feQIbI4vyTJIW_2yaIYW-3EBjjMl8Cf/s1600/IMG_0068.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS4u7ql6mrGHlhsCgfNMIao6CNKRrcVngeECgAjQFtyVrZ5UOBxki-SO-4P2uPv6mlkQy_WsC1dp0QgUxIYv4whLRKefm-r51CAmWs7-b6Tmvr9feQIbI4vyTJIW_2yaIYW-3EBjjMl8Cf/s320/IMG_0068.JPG" width="240" /></a></div>
<div>
<span style="font-size: small;"><span style="font-weight: normal;"><br /></span></span></div>
</div>
<div style="text-align: left;">
<div style="line-height: 100%; margin-bottom: 0in;">
</div>
</div>
</h2>
<h2>
<div style="text-align: left;">
<div style="text-align: left;">
<span style="font-size: small; font-weight: normal;">All of the original RedBot connectors were maintained so that the Arduino board can be restored if need be. The new brain supports all of the original features:</span></div>
<div style="text-align: left;">
<ul>
<li><span style="font-size: small; font-weight: normal;">Dual Motor Drive</span></li>
<li><span style="font-size: small; font-weight: normal;">Encoders for each motor</span></li>
<li><span style="font-size: small; font-weight: normal;">Left and right mechanical bumpers.</span></li>
<li><span style="font-size: small; font-weight: normal;">On board LED.</span></li>
<li><span style="font-size: small; font-weight: normal;">On board push button switch</span></li>
<li><span style="font-size: small; font-weight: normal;">Piezo buzzer</span></li>
<li><span style="font-size: small; font-weight: normal;">Line followers</span></li>
<li><span style="font-size: small; font-weight: normal;">Accelerometer</span></li>
</ul>
<div>
<span style="font-size: small;"><span style="font-weight: normal;">In addition a 5 volt regulator was added to keep the Raspberry Pi 3 happy for as long as possible when running on battery power.</span></span></div>
<div>
<span style="font-size: small;"><span style="font-weight: normal;"><br /></span></span></div>
<div>
<span style="font-size: small;"><span style="font-weight: normal;">Current limiting resistors were also added to the bumper and push button switches. This helps protect the Pi's GPIO pins.</span></span></div>
<div>
<span style="font-size: small;"><span style="font-weight: normal;"><br /></span></span></div>
<div>
<span style="font-size: small;"><span style="font-weight: normal;">All in all, I am quite pleased with the outcome. </span></span></div>
<div>
<span style="font-size: small;"><span style="font-weight: normal;"><br /></span></span></div>
<div>
<span style="font-size: small;"><span style="font-weight: normal;">Next up, the software!</span></span></div>
<div>
</div>
</div>
</div>
</h2>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-78645518528529154322016-09-02T11:53:00.000-04:002016-10-02T14:37:26.022-04:00<div style="text-align: left;">
2 September 2016</div>
<h2 style="text-align: center;">
I'm Back!</h2>
<div>
<br /></div>
<div>
I haven't posted anything in a while and thought would do a quick post about what I have been up to and what I will be posting about in the coming days and weeks.</div>
<div>
<br /></div>
<div>
I have been working on replacing the Arduino based controller board on my <a href="https://www.sparkfun.com/products/12649" target="_blank">RedBot</a> with a Raspberry Pi. Yeah, I know, RPi based robots are nothing new and maybe even boring at this point in time, but my focus has always been on software, and a RedBot with a Linux powered brain gives me the perfect platform for me to try out my software musings.</div>
<div>
<br /></div>
<h3>
Whatever happened to Wire Wrapping? #bringBackWireWrap</h3>
<div>
Back in the late 1970's, when I did a lot of hardware prototyping, a prototyping technique that was all the rage was <i>wire wrapping. </i>It seems to have disappeared off the face of the earth and I have no idea why. For those not familiar with this technique, it predated wireless breadboards and allowed one to connect components together without soldering. You simply placed a wire wrap terminal or socket on a perf board, and then using a special tool, wrapped a lead around the terminal. The connection was easy to make, easy to remove, and gave great conductivity. Here is a picture:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0Lbo7lmECcZ34mzuDxi1i98KV3TncKjvUojhhmaycqXjM7NTazTSDtvKIm64zKcjTVbILVTAUBMWXuIaiteaGJgP9alX4o8AIIq2bLUsKTDQ0hm5rSErgdKucI83FXNaKH1c1Tx9V-Oz3/s1600/wirewrap_fig6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0Lbo7lmECcZ34mzuDxi1i98KV3TncKjvUojhhmaycqXjM7NTazTSDtvKIm64zKcjTVbILVTAUBMWXuIaiteaGJgP9alX4o8AIIq2bLUsKTDQ0hm5rSErgdKucI83FXNaKH1c1Tx9V-Oz3/s1600/wirewrap_fig6.jpg" /></a></div>
<div>
<br /></div>
<div>
There is a great article on <a href="http://makezine.com/2009/07/27/lost-knowledge-wire-wrapping/">makezine.com</a> about the technique.</div>
<div>
<br /></div>
<div>
Now don't get me wrong, for quick a proof of concept, a wireless breadboard can't be beat, but when it comes to actually building a board that is not a printed circuit board, transferring the prototype to working design can be a challenge.</div>
<div>
<br /></div>
<div>
For the RedBot Raspberry Pi brain transplant, I decided to use a <a href="https://www.sparkfun.com/products/12070">solder-able breadboard</a>. Sounds like a great idea in theory, and I am using it, but for my needs it is far from perfect. First, you need to solder. The solder holes are getting smaller and my eyes are getting weaker - not a great combination. When I first started prototyping back in the vacuum tube days - 100 watt irons, massive connectors with equally massive connection points, which were all the rage, soldering was really simple. Not so today.</div>
<div>
<br /></div>
<div>
Also, using a wireless breadboard layout is not ideal. There is a lot of wasted real estate on the board to accommodate the connection redundancy. Again great when testing out a design or creating a temporary one, but horrible for a real world permanent solution.</div>
<div>
<br /></div>
<div>
In addition, I am a software guy. When I screw up the software, I rewrite a few lines and fix the problem. When I solder something incorrectly or decide there is a better way to do things, I need to find my solder sucker and pray I don't destroy the board or components.</div>
<div>
<br /></div>
<div>
Wire wrapping alleviated all these problems. It was simple and quick to do and just as easy to remove an errant connection. Sparkfun, Adafruit I am calling on you to #bringBackWireWrap.</div>
<div>
<br /></div>
<h3>
RedBot Brain Surgery</h3>
<div>
<br /></div>
<div>
Here is a picture of my creation taken about a week ago. I have since added an LED and push button switch.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvRciQEJK-lK_R9PUmXqlcTkYskxTJDfyNdFMjjgYB8PZiQgXMqFjBtdJtxRueCgQPi12zl6ft16hb1M8t-wttzZSD7O4w3tr_fwrEZMVQQY2Q5EbAYCzc-6qtc4bnW9_pPkS3ULw8CHvr/s1600/IMG_0039.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvRciQEJK-lK_R9PUmXqlcTkYskxTJDfyNdFMjjgYB8PZiQgXMqFjBtdJtxRueCgQPi12zl6ft16hb1M8t-wttzZSD7O4w3tr_fwrEZMVQQY2Q5EbAYCzc-6qtc4bnW9_pPkS3ULw8CHvr/s1600/IMG_0039.JPG" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It supports a <a href="https://www.pololu.com/product/2123">5V Up/Down voltage regulator</a>, <a href="https://www.amazon.com/gp/product/B00BXX4UWC/ref=oh_aui_detailpage_o09_s00?ie=UTF8&psc=1">4 channel A/D converter,</a> <a href="https://www.amazon.com/gp/product/B00L9O7NRE/ref=oh_aui_detailpage_o08_s00?ie=UTF8&psc=1">ADXL345 accelerometer,</a> and a <a href="https://www.pololu.com/product/2135">motor controller</a>.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I will be connecting to the RPi using a <a href="https://www.amazon.com/gp/product/B01FE9EQ88/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1">Pi EZ-Connect</a>.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimvbX9gk7qMSDiCWQQncZjGGK54U6jW89WKBh6nJ1TsyLV738ooPwWykM7Nwt7XMCCMGTU1-TWhQY_EGcj-j1cSJ1x_0jxDuBySCY7swxHrjLMGcJSB_n6YvpsBlBi6wZBEnUZ5vPpB4sx/s1600/NewImage155.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimvbX9gk7qMSDiCWQQncZjGGK54U6jW89WKBh6nJ1TsyLV738ooPwWykM7Nwt7XMCCMGTU1-TWhQY_EGcj-j1cSJ1x_0jxDuBySCY7swxHrjLMGcJSB_n6YvpsBlBi6wZBEnUZ5vPpB4sx/s320/NewImage155.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
<br /></div>
<h3>
Why a Pi?</h3>
The Raspberry Pi 3 is a cost effective platform for me to play with. First it offers a mainstream Linux OS (Debian). It has integrated WiFi and bluetooth, a fairly hefty 4 core processor, and plenty of room for additional software on the SD card.<br />
<div>
<br /></div>
<div>
The stability of the Pi, and its community support in my opinion, is unsurpassed. </div>
<div>
<br /></div>
<div>
Using a Pi allows me to write everything in Python 3, my language of preference.</div>
<div>
<br /></div>
<h3>
GPIO Support</h3>
<div>
I have selected the <b><i><a href="http://abyz.co.uk/rpi/pigpio/">pigpio</a></i></b> library to be the basis of low level GPIO control. This may be controversial, but I think pigpio is the best RPi GPIO control library available for Python. It supports Python 3 (as well as 2), is actively supported by its author (joan - your the best!), and its API is concise and simple to understand (even for a simpleton like me.)</div>
<div>
<br /></div>
<h3>
RedBot Supported Features and Hardware Improvements</h3>
<div>
I will be maintaining the features of the Arduino based RedBot. I decided not to reuse the RedBot accelerometer board since that device requires a fairly complicated i2c solution. Instead, I am using the ADXL345, which allows for much simpler software.</div>
<div>
<br /></div>
<div>
By creating my own interface board, I also added some hardware "improvements". For example, I have added current limiting for both the push button switch and bumpers.</div>
<div>
<br /></div>
<h3>
<a href="http://zeromq.org/">ZeroMQ</a> Pub/Sub Based software Modules</h3>
<div>
The software will revolve around a <a href="http://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/pubsub.html">ZeroMQ Pub/Sub</a> communication pattern. This effort will <i>not </i>be using Python asyncio, but instead a simpler multi-process approach that uses custom protocols implemented in <a href="http://msgpack.org/index.html">MessagePack</a>- stay tuned and all will be revealed. </div>
<h3>
A Kivy GUI</h3>
<div>
Eventually, when all else is working I will be implementing a <a href="https://kivy.org/#home">Kivy</a> based GUI. Kivy is a Python based GUI library that I found compelling both visually and from a programming standpoint.</div>
<div>
Currently, I have Kivy working with ZeroMQ for the PC.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDQ8V8WLXDdvD9zsioG6pBWiSZe_YxE1puRYIFIwYv9tMdEL8WNZXUBsEN2UmJjn4VH20iaETWBSJbLKf8fzDVl2sm5Ekyvm-1PEnTnrh2CsAeQlaAuLb58pKFkSZ9cJxO1Q13qkeCKTgz/s1600/Screenshot+from+2016-04-28+16-13-05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDQ8V8WLXDdvD9zsioG6pBWiSZe_YxE1puRYIFIwYv9tMdEL8WNZXUBsEN2UmJjn4VH20iaETWBSJbLKf8fzDVl2sm5Ekyvm-1PEnTnrh2CsAeQlaAuLb58pKFkSZ9cJxO1Q13qkeCKTgz/s320/Screenshot+from+2016-04-28+16-13-05.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Kivy comes with a sophisticated tool called Buildozer, that ports the GUI to an Android .apk file.</div>
<div class="separator" style="clear: both; text-align: left;">
Unfortunately, I have not been able to get ZeroMQ and Buildozer to play nice together. Hopefully that will be solved in the near future. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 style="clear: both; text-align: left;">
More To Come Later ...</h3>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-47774761722480997222016-07-31T15:31:00.002-04:002016-07-31T15:31:36.571-04:00<h2 style="text-align: center;">
Version 2.15 pymata-aio</h2>
<h2 style="text-align: center;">
Released</h2>
<div>
This version fully implements the StandardFirmata 2.5.3 protocol. It also includes a new version of pymata_iot. We are no longer using autobahn for websocket support, but have moved to the websockets package.</div>
<div>
<br /></div>
<div>
To install from pip:</div>
<div>
<br /></div>
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><b>pip install pymata-aio</b></span></div>
<div style="text-align: center;">
<br /></div>
<div>
To upgrade from an older version using pip:</div>
<div>
<br /></div>
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><b>pip install pymata-aio --upgrade</b></span></div>
<div style="text-align: center;">
<br /></div>
<div>
You can also <a href="https://github.com/MrYsLab/pymata-aio" target="_blank">download</a> the .zip file, unpack and run:</div>
<div>
<br /></div>
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><b>setup.py install</b></span></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-66521610092338054432016-07-29T16:26:00.000-04:002016-07-29T16:26:45.445-04:00<h2 style="text-align: center;">
Updates Available for pymata-aio, s2aio and FirmataPlus</h2>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Pymata-aio version 2.14 and s2aio version 2.9 are now available on Pypi.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
To upgrade s2aio to the latest version, in a command window type:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><b>pip install s2aio --upgrade</b></span></div>
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: inherit;">This should update both s2aio and pymata_aio.</span></div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: inherit;">To upgrade pymata-aio, </span>in a command window type:</div>
<div>
<br /></div>
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><b>pip install pymata-aio --upgrade</b></span></div>
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span></div>
<div style="text-align: left;">
<span style="font-family: inherit;">FirmataPlus and its variants have been updated and are baselined against StandardFirmata 2.5.3.</span></div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
These libraries now support both PyMata and pymata-aio. You can download the zip file <a href="https://github.com/MrYsLab/pymata-aio/blob/master/FirmataPlus/libraries.zip?raw=true" target="_blank">here</a> and installation instructions can be found <a href="https://github.com/MrYsLab/pymata-aio/wiki/Uploading-FirmataPlus-to-Arduino" target="_blank">here</a>.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com7tag:blogger.com,1999:blog-4642385059824018272.post-29921223402555739792016-05-07T20:49:00.000-04:002016-05-07T20:54:19.231-04:00<h2 style="text-align: center;">
<span style="font-size: x-large;">A Simple Thank You</span></h2>
<div>
<div>
It seems very strange to me indeed, writing about someone I have never met, nor even have been in the presence of - very strange indeed. Over the course of my professional life and career, I have been fortunate enough to have been in the presence of such luminaries as Dennis Ritchie, Ken Thompson, Bjarne Stroustrup and the two Steves, Wozniak and Jobs, and actually had the good fortune to have had conversations with several, but I don’t think that anyone of these folks has given me more insight into my chosen craft than Pieter Hintjens. </div>
<div>
<br /></div>
<div>
Perhaps you are unfamiliar with Pieter, and until recently so was I. Pieter, amongst many, many, other things, is the author and technical genius of ZeroMQ. Pieter is also a human being, a philosopher if you will, and someone who carefully considers and writes about culture, society and technology. Oh, did I mention, a prodigious author of open source software?</div>
<div>
<br /></div>
<div>
I have just begun to read Pieter’s books, “Social Architecture”, “The Psychopath Code”, “Culture & Empire: Digital Revolution”, and “Code Connected, Vol. 1”, but I have come to know Pieter mostly by working with ZeroMQ over the past several months. I have never actually spoken with Pieter, but the elegance of ZeroMQ has spoken to me in ways I cannot really express. Its encapsulation of complexity, expressed in simplicity is something I marvel at. To me, it is a reflection of the man, his philosophy and genius. </div>
<div>
<br /></div>
<div>
Sadly, recently, I’ve learned that Pieter is gravely ill. Even though this is devastating news, Pieter has somehow managed to write about his illness in direct and inspiring ways. You can read these writings on his blog,<a href="http://hintjens.com/" target="_blank"> http://hintjens.com/</a>. I don’t know how he does it, but he manages to inspire even at a time like this.</div>
<div>
<br /></div>
<div>
And so Pieter, I simply wanted to say thank you. It is just too soon for me to say goodbye.</div>
</div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-81986384567723609332016-05-05T08:39:00.000-04:002016-05-05T08:39:13.092-04:00<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h2 style="clear: both; text-align: center;">
<span style="font-size: x-large;">XiBot For RedBot Has Been Released</span></h2>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCTLGAzM5Z__XEJQmU-F2VjZ1mBYDVW0RCCSApaA9K8OryfP_-et3DgDrzrCkaXyKEmfyGXDQs3fV17ZHK073D53ZmbIQQcHQcL6MlSFKPJdgV2CP1v_0g6HMCG-I_wXHE-Uy-QEJ0wta0/s1600/Screenshot+from+2016-05-03+16-13-37.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCTLGAzM5Z__XEJQmU-F2VjZ1mBYDVW0RCCSApaA9K8OryfP_-et3DgDrzrCkaXyKEmfyGXDQs3fV17ZHK073D53ZmbIQQcHQcL6MlSFKPJdgV2CP1v_0g6HMCG-I_wXHE-Uy-QEJ0wta0/s640/Screenshot+from+2016-05-03+16-13-37.png" width="640" /></a></div>
<br />
As a proof of concept, the Sparkfun RedBot has been turned into the first XiBot. Read all about it on the <a href="https://github.com/MrYsLab/xibot/wiki" target="_blank">XiBot Wiki</a>.<br />
<br />
The code may be downloaded on<a href="https://github.com/MrYsLab/xibot" target="_blank"> Github</a>.<br />
<h2 style="text-align: center;">
<br /></h2>
<div>
<br /></div>
<div>
<br /></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0tag:blogger.com,1999:blog-4642385059824018272.post-11707058669513417882016-04-28T17:14:00.000-04:002016-04-28T17:15:05.281-04:00<h2 style="text-align: center;">
<span style="font-size: x-large;"><i>XiBot</i> Is On The Drawing Board</span></h2>
<div>
As a summer project, I am planning on building a simple Raspberry PI 3 based robotic vehicle using <a href="http://htmlpreview.github.io/?https://github.com/MrYsLab/xideco/blob/master/documentation/xidekit/xidekit.html" target="_blank">XideKit</a> for the control transport. To control and monitor the little beast, I have cobbled together a tkinter GUI that currently looks like this:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9k9nPCQA5tzU1zAE0bLWz23FLwPdCc-DDaO5Tw3CuVNNUf92jDZiKGRp8BuPNThV0nBCb_QzXj7UaJuulYDNPGos525YU182Yqzj4aA0TTS42n3sl_FD1OHk-T1twxNeewWlBh40S9zwm/s1600/Screenshot+from+2016-04-28+16-14-07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="428" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9k9nPCQA5tzU1zAE0bLWz23FLwPdCc-DDaO5Tw3CuVNNUf92jDZiKGRp8BuPNThV0nBCb_QzXj7UaJuulYDNPGos525YU182Yqzj4aA0TTS42n3sl_FD1OHk-T1twxNeewWlBh40S9zwm/s640/Screenshot+from+2016-04-28+16-14-07.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Tkinter made it fairly easy to create ( the logic to connect the GUI to the hardware is still a work in progress) and my hope is that with the aid of XideKit, I can attach this GUI to either my custom little robot, a Sparkfun RedBot, or any other robot for that matter (with a XideKit adapter of course).without having to change one line of GUI code. In fact the GUI allows you to select up to 3 robots to control no matter what the platform (the XiBot is a Raspberry PI device and the RedBot is Arduino based).</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Tkinter meets almost all of my needs for a GUI. The code is relatively easy to write, tkinter is included as a standard part of Python, and as a result will run on Windows, Mac or Linux. Mobile devices on the other hand are not readily supported. If you know of a way to run tkinter on an Android or iOS device, please let me know. And so, I already have a "Phase 2" planned using a Python based GUI library called <a href="https://kivy.org/#home" target="_blank">Kivy</a>. Kivy applications can be run on mobile devices as well as desktop operating systems. To this end, I have cobbled together the following Kivy GUI that is similar to the center panel of tkinter effort.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUMJHmaV1qdfPx_rDPWv4AnOcT5qzMhCbmqhZmsbdeYpPdBujnZzmNfzDFtnHMBCcYXzu6KvIxeJHOk2MLUgS9IA5oRFSE40YQkV3xXPzWIlFeyhINcil5-vxAniza_3VgARxQbYidsxPF/s1600/Screenshot+from+2016-04-28+16-13-05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUMJHmaV1qdfPx_rDPWv4AnOcT5qzMhCbmqhZmsbdeYpPdBujnZzmNfzDFtnHMBCcYXzu6KvIxeJHOk2MLUgS9IA5oRFSE40YQkV3xXPzWIlFeyhINcil5-vxAniza_3VgARxQbYidsxPF/s640/Screenshot+from+2016-04-28+16-13-05.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
I was able to create this in about 3 hours, so I am hopeful that I will be able to complete it to support all of the features of its tkinter cousin, and also be able to run on an Android tablet or phone from a single set of source files.</div>
<div>
<br /></div>
<div>
I will post my progress as this project progresses.</div>
<div>
<br /></div>
<div>
This is going to be busy summer.</div>
<div>
<span style="font-size: x-large;"><br /></span></div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com3tag:blogger.com,1999:blog-4642385059824018272.post-70915038961805925152016-04-09T12:09:00.000-04:002016-04-09T12:09:00.036-04:00<h2 style="text-align: center;">
<span style="font-size: x-large;"><a href="https://github.com/MrYsLab/xideco/wiki" target="_blank">Xideco</a> 0.5.0 Released</span></h2>
<h3 style="text-align: center;">
<span style="font-size: large;">Learn How to Easily Create Your Own Network Distributed Applications </span><span style="font-size: large;">With</span></h3>
<h3 style="text-align: center;">
<span style="font-size: x-large;">The <i>XideKit</i> API Class</span></h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD-4ob00yJTcajz2SK_bp3I-b2kNuzj4QrmZSd9-U-JFbE7tm8QkIxOWienFkye6EZgnoJkVVxddMiHeDooYXtESeDKMngrKlF0EOmYF8EPPAQAyMNRlqkkLSnJG_OI0-gP1OlvymH18na/s1600/kids.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD-4ob00yJTcajz2SK_bp3I-b2kNuzj4QrmZSd9-U-JFbE7tm8QkIxOWienFkye6EZgnoJkVVxddMiHeDooYXtESeDKMngrKlF0EOmYF8EPPAQAyMNRlqkkLSnJG_OI0-gP1OlvymH18na/s400/kids.jpg" width="337" /></a></div>
<div>
<span style="font-size: x-large;"><br /></span></div>
<div>
<br /></div>
<div>
This release includes the <b><i><a href="https://github.com/MrYsLab/xideco/wiki/XideKit-API" target="_blank">XideKit</a></i></b> API class that encapsulates ZeroMQ and MessagePack operations. A tutorial for using XideKit is available <a href="http://htmlpreview.github.com/?https://github.com/MrYsLab/xideco/blob/master/documentation/xidekit/xidekit.html" target="_blank">here</a>. Examples with videos are provided. You can view the example code <a href="https://github.com/MrYsLab/xideco/tree/master/xideco/xidekit/xidekit_examples" target="_blank">here</a> and view the API <a href="http://htmlpreview.github.io/?https://github.com/MrYsLab/xideco/blob/master/xideco/xidekit/apidocs/api.html" target="_blank">here</a>.</div>
Mr. Ys Lab Noteshttp://www.blogger.com/profile/17720832265944935004noreply@blogger.com0