tag:blogger.com,1999:blog-25484036427980679662024-02-18T20:45:09.354-08:00SDSC SandboxThe SDSC Sandbox is a space at the San Diego Supercomputer Center for UCSD undergraduates to develop learning materials for middle and high school students to learn parallel computing. Right now, we're focusing on the Raspberry Pi as the ideal tool for presenting a simplified model of a supercomputer. Trust us, it's a lot easier to build a cluster out of computers that weigh less than 1% of a typical server--and the network team is more than willing to part with 100BASE-TX switches. Anonymoushttp://www.blogger.com/profile/02444046573847663353noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-2548403642798067966.post-21353691928552111792013-12-19T09:32:00.001-08:002013-12-19T09:32:52.787-08:00VIS198 - MPIScope for Distributed Graphics Applications<p>
Within the context of our data visualization project my role was mostly
to develop a framework with which the other members of the team could implement
their graphical ideas.
To accomplish this goal
I developed a <a href="https://github.com/Wollw/mpiscope">Python module</a> to contain
the data retrieval and basic structure of
distributed rendering and provide a simple hook for other people to plug their
renderers into. Also provided is a hook for a parsing function used to transform
the datasets retrieved into a smaller or refined data set before being passed to
the renderer itself. By abstracting away the data retrieval and distributed nature
of the program this framework allowed rendering classes to be implemented without
concern for the retrieval of data or the distributed nature of the cluster.
The python module itself is available <a href="https://github.com/Wollw/mpiscope">here</a>.
<p>
The module itself is divided into two main source files and three classes, the main of
which is the
<a href="https://github.com/Wollw/mpiscope/blob/master/mpiscope/MPIScope.py#L17">MPIScope class</a>
within
<a href="https://github.com/Wollw/mpiscope/blob/master/mpiscope/MPIScope.py">MPIScope.py</a>.
This is the user facing class which handles initialization and setup of the program.
When provided with a rendering object and a dictionary of keys with URLs
to retrieve data from (and optionally a parse function and delay time),
the MPIScope object will handle the communication between nodes and synchronization
of the different displays.
<p>
A <a href="https://github.com/Wollw/mpiscope/blob/master/bin/example.py">simple example</a>
is provided with the module and is repeated here.
<pre class="brush: python">
from mpiscope import MPIScope
from mpiscope import DummyRenderer
urlList = { "gordon" : "http://sentinel.sdsc.edu/data/jobs/gordon"
, "tscc" : "http://sentinel.sdsc.edu/data/jobs/tscc"
, "trestles" : "http://sentinel.sdsc.edu/data/jobs/trestles"
}
def parse(data):
print(data)
return data
mpiScope = MPIScope(DummyRenderer(), urlList, parse, delay=60)
mpiScope.run()
</pre>
In this example a new MPIScope instance is created from a DummyRenderer, a list
of urls for supercomputers at the SDSC, very basic parse function that simply functions as the identity,
and a delay of 60 seconds. In this case the parse and delay arguments are largely redundant;
parse simply prints its output for debugging purposes and by default delay is 60 seconds.
After this instantiation the program is run by the invocation of mpiScope.run().
<p>
The parse function here requires some elaboration.
The "data" it receives is simple the urlList dictionary with the URLs replaced with
a dictionary of keys and values corresponding to the JSON data retrieved from the URL for
each key. The parse function can them be used to filter or reduce this data set before
it is given to the renderer. A final thing of note about this function is that it and
the data retrieval itself runs on a separate thread than the renderer. A result of this is that
if a data set is sufficiently large and your hardware is sufficiently weak it <em>may</em>
help performance to offload this data processing to another thread.
<p>
For our purposes this MPIScope class seems to fulfil its purpose well enough, but we haven't
had a chance to test our work on the actual Raspberry Pi cluster we are targeting.
Some of the implementation details are somewhat sketchy, but until it is running on the
actual target hardware I don't believe it to be worth attempting to optimize it.
For the moment the public interface is fairly simple, but one pain point I've already
noticed is the lack of a simple way of retaining old data sets when new data is obtained.
The solution for now is to store the older data sets in the Render object in the renderer's draw method,
but this is far from ideal.
At this point the problems I see with the module don't seem serious enough to complicate the class
to fix.
<p>
The other important file in the module is the
<a href="https://github.com/Wollw/mpiscope/blob/master/mpiscope/DummyRenderer.py">DummyRenderer</a>
file and class.
While this class shouldn't be used in a real application, it does provide an example of
how a renderer class to provide to MPIScope should look.
The comments in the file are fairly self explanatory, but essentially the start method
should be used to create a graphics context, draw should be used to do any actual drawing based on
the data set, and flip should be used to notify your graphics library to display the newly rendered buffer.
This project was a large learning experience for me for two major reasons. Firstly, learning how to
program a cluster of computers is very new to me and I learned what I did while working on this module.
Secondly, and perhaps most importantly, this was my first time working on a real team programming project with clear division of labor.
I'm used to having complete creative control over my projects, so learning to allow others to do their part
without interfering took effort on my part. Another part of this challenge for me was in having to think
more deeply about the API I created than if I was working alone; not being able to break things whenever I wanted
required more thought about my changes and how they would affect the other project members.
This requirement of communication and cooperation made things more difficult at first, but eventually
made the project less stressful as I learned to focus on my parts of the project rather than the
project as a whole.
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2548403642798067966.post-52199681043185688362013-06-07T18:24:00.003-07:002013-06-07T18:24:41.431-07:00Cluster Rack Phase II'm getting excited--the <a href="http://sdsc-sandbox.blogspot.com/2013/04/raspberry-pi-cluster-rack-sketch.html">design that started on the kitchen table</a> is progressing!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCILBUZHkr5GwYMwkZQSfgN0Y_gi5pE01FaukBrWKv6_Qx9kNrLJi_3wU70DdPQXgBgIufHAgCG5pTKOo8VVvQXGiLM-WPbUdtETuNk_FB5T6ILWFCB8W_2wPq5nNGC0Ni5qiJmEYANsw/s1600/PiRackProto.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCILBUZHkr5GwYMwkZQSfgN0Y_gi5pE01FaukBrWKv6_Qx9kNrLJi_3wU70DdPQXgBgIufHAgCG5pTKOo8VVvQXGiLM-WPbUdtETuNk_FB5T6ILWFCB8W_2wPq5nNGC0Ni5qiJmEYANsw/s400/PiRackProto.jpg" width="300" /></a></div>
<br />
<a name='more'></a>This is a stack of 15 <a href="http://www.raspberrypi.org/">Raspberry Pis</a>, to drive our tiled display wall (you know, the one we use for <a href="http://sdsc-sandbox.blogspot.com/2013/04/parallel-pong-on-raspberry-pis.html">Pong</a>). Unlike some other stacking solutions that use the mounting holes and couplers threaded at both ends (e.g., <a href="http://coen.boisestate.edu/ece/raspberry-pi/">Joshua Kiepert’s at Boise State</a>), we're trying threaded rod, with some small sleeves that I found at a local fastener shop. The M2.5 threaded rod was very hard to find; I may have acquired all that was left in the U.S.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://docs.google.com/drawings/d/1Yj8XEDDEvR5noyWZBdRetjQbVrKONoz93yoN1u0sCdo/edit?usp=sharing" style="margin-left: auto; margin-right: auto;"><img alt="" border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIiviqihAXf0hghQDRyNVG-wkQmwJRWcweZSvpT9mYGF5r_i8H1Dpgr0Q4YQBW_rQ3Kj3WGjFjGUzzPDz82KsdSOoJvsld99kGAXSF3M9VaDj9p9yqYlDeUxYIEWlAuHgejnRgLzM0Y6U/s320/Raspberry+Pi+Floating+Rack+Design.png" title="Raspberry Pi Float Rack" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Simple floating rack.</td></tr>
</tbody></table>
<br />
For the final design, we'll split the Pis up into 5 stacks of 3, to match the LCD panels in the wall, and the stacks will be mounted on a sheet of acrylic (take a look to the right). My hope is that this will make the connection between the computer doing the work, and what's shown on the display more tangible, especially when the computers are working in parallel. (Note to self: must coordinate with some blinkenlights on the Pis).<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj56Hi34yIIaJkWg6z2ius4GmKmTj2-qq9htej2gTP1Y5S1DStKZ6uYlSiArmut6Hjm0hF27RoNC15puo52x0jefeAf96XYs4BOPAFiUGRk3PhpKUoumQvDoD0DPEHN4Mrmzu6J29b3a5o/s1600/DSCN0640.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj56Hi34yIIaJkWg6z2ius4GmKmTj2-qq9htej2gTP1Y5S1DStKZ6uYlSiArmut6Hjm0hF27RoNC15puo52x0jefeAf96XYs4BOPAFiUGRk3PhpKUoumQvDoD0DPEHN4Mrmzu6J29b3a5o/s320/DSCN0640.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Most importantly, it will look a lot better than it does right now.</td></tr>
</tbody></table>
Anonymoushttp://www.blogger.com/profile/02444046573847663353noreply@blogger.com0tag:blogger.com,1999:blog-2548403642798067966.post-71614965210066129062013-05-14T17:03:00.005-07:002013-05-14T17:03:56.092-07:00Simplifying the Joysticks' WiringOur <a href="http://sdsc-sandbox.blogspot.com/2013/04/parallel-pong-on-raspberry-pis.html">Parallel Pong</a> game uses a couple of <a href="http://sdsc-sandbox.blogspot.com/2013/04/interfacing-zippyy-joysticks-with.html">Zippy Joysticks</a>, which have been connected via a breadboard. In order to free the joysticks from the bulky breadboard and ensure more secure wiring, we acquired a small <a href="http://www.adafruit.com/products/1171" target="_blank">Adafruit PermaProto board</a> and a <a href="http://www.adafruit.com/products/862" target="_blank">ribbon cable</a> to transfer the functions of the Raspberry Pi's GPIO pins directly to the board.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIUjrYReYRXWfUahiQ8xAVaLZV3vpJdo9HYxCQdUgRHjVRurrqzRvDNOs8Z0AshqogMSwWIx-Bt8X_Ti9S9l-J7keqQsz0vLl1-TDNGAlZHQLepHGZYFKrcNBnnP_Y_17OPDZIGIAx9Wg/s1600/IMG_1802.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIUjrYReYRXWfUahiQ8xAVaLZV3vpJdo9HYxCQdUgRHjVRurrqzRvDNOs8Z0AshqogMSwWIx-Bt8X_Ti9S9l-J7keqQsz0vLl1-TDNGAlZHQLepHGZYFKrcNBnnP_Y_17OPDZIGIAx9Wg/s400/IMG_1802.JPG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">PermaProto Board and ribbon cable</td></tr>
</tbody></table>
<br />
<a name='more'></a>Upon connecting the ribbon cable to the Pi and soldering the pins onto the board, we transferred the wires corresponding to the GPIO pins directly onto the board. With our configuration, this came out to be as follows:<br />
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3n3CXQZOnLdo-CQBNLrX2BRAkzT-SqDCATCvGhNxt1hpb33yv8zPwpRqXs8LOiEMQMRue6upoC-Kt-BuNRHNg3Kg_fsoqivLif5KhBNgM2gWV9NsErfznCSIkesO0LKCzJdX14QO7LEc/s1600/IMG_1743.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3n3CXQZOnLdo-CQBNLrX2BRAkzT-SqDCATCvGhNxt1hpb33yv8zPwpRqXs8LOiEMQMRue6upoC-Kt-BuNRHNg3Kg_fsoqivLif5KhBNgM2gWV9NsErfznCSIkesO0LKCzJdX14QO7LEc/s1600/IMG_1743.JPG" width="478" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">GPIO 4: Joystick 1 Up, GPIO 7: Joystick 1 Down, GPIO 21: Joystick 2 Up, GPIO 27: Joystick 2 Down<br />
Each switch is powered with 3V.</td></tr>
</tbody></table>
<div>
(For financial efficiency and mobility's sake, we used network cables to wire the joysticks to the board.)</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDOs1K3pBbaPPz2aUME50glYRuojnnaws86jhuR_xrgMg8iDuoMlVU01Z2zP_cryhxQzg06SCPBwRTV5cwEdB10XzTtrRdnzd_WZbPBCfZgtvJQvY_2hQEFO0DuFcMMD6usv1pJidGgVU/s1600/IMG_1739.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDOs1K3pBbaPPz2aUME50glYRuojnnaws86jhuR_xrgMg8iDuoMlVU01Z2zP_cryhxQzg06SCPBwRTV5cwEdB10XzTtrRdnzd_WZbPBCfZgtvJQvY_2hQEFO0DuFcMMD6usv1pJidGgVU/s400/IMG_1739.JPG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">End product.</td></tr>
</tbody></table>
<div>
<br />
<br />
<div>
<br /></div>
</div>
Amy Teshimahttp://www.blogger.com/profile/15482877685308773070noreply@blogger.com0tag:blogger.com,1999:blog-2548403642798067966.post-91977601651318877012013-04-23T00:36:00.000-07:002013-04-23T00:45:58.351-07:00Raspberry Pi Cluster Rack Sketch<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK10k6-T-RgMiVKW2m6wwsSLNAIR7mgi22W85n8tCnwRrSYbWEaJZzrYRrFQsdFHQ29pfCKxSVqcUTnqQHQafwcox08dmuDShyphenhyphenOiY0Et_GI1C57KYY2TBZjJ0lWV-E1DFzVybnwHJqzxE/s1600/Photo+2013-04-21+06.58.41+PM.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK10k6-T-RgMiVKW2m6wwsSLNAIR7mgi22W85n8tCnwRrSYbWEaJZzrYRrFQsdFHQ29pfCKxSVqcUTnqQHQafwcox08dmuDShyphenhyphenOiY0Et_GI1C57KYY2TBZjJ0lWV-E1DFzVybnwHJqzxE/s320/Photo+2013-04-21+06.58.41+PM.jpg" width="320" /></a><br />
If you've looked at the earlier posts, you probably noticed the spaghetti with Raspberry Pis laid out in front of the display wall. <a class="g-profile" href="http://plus.google.com/106566902957150580781" target="_blank">+ET Parreira</a> has certainly mentioned it to me, after he had to set up <a href="http://sdsc-sandbox.blogspot.com/2013/04/parallel-pong-on-raspberry-pis.html">Pong</a> after <a href="http://sdsc-sandbox.blogspot.com/2013/04/ucsd-triton-day-2013.html">Triton Day</a>. That's what happens when you're feeling your way around a new piece of hardware and just trying to <a href="http://sdsc-sandbox.blogspot.com/2013/04/interfacing-zippyy-joysticks-with.html">get the code working</a>.<br />
<br />
<a name='more'></a><br /><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Well, I agree that dragging around a bunch of re-purposed CAT5 cables (that's what the joystick cables are) that have been cut off and stuck into a bread board is not convenient. So, I spent some time sketching out a new rack for the cluster of Raspberry Pis that will drive the tiled display wall. The biggest design constraint is the cables that will be coming out of the Pis, particularly the HDMI and network cables. The power cables aren't particularly heavy, but the HDMI cables in particularly have a minimum radius of curvature (tightest bend radius) of about 4 1/2". Also, while this cluster will have video displays attached, we'll still need to connect keyboards to the USB jacks for troubleshooting. Anyone with experience in a data center knows where this thinking is coming from. The two possible arrangements that came to me immediately were:<br />
<ul>
<li>Pis "on edge", with HDMI cables on top;</li>
<li>small stacks of Pis, spaced to provide room for the HDMI cables.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2KTbDayqdlOq__K2WeoL71k-sQ5mvTBr84DCFIZaDC_cyhi6zg-xHj3dR7HkRNhvtFfcyFoPtAnj2JjMPH1coKxzA5ywu5ATVNkRWlOW7Ry5veaczqIlIz5xzngVhMa9V9Yt8ip_xppc/s1600/rack-sketchlvl.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2KTbDayqdlOq__K2WeoL71k-sQ5mvTBr84DCFIZaDC_cyhi6zg-xHj3dR7HkRNhvtFfcyFoPtAnj2JjMPH1coKxzA5ywu5ATVNkRWlOW7Ry5veaczqIlIz5xzngVhMa9V9Yt8ip_xppc/s400/rack-sketchlvl.jpeg" width="308" /></a></div>
The small stacks version is roughly similar to the <a href="http://www.southampton.ac.uk/~sjc/raspberrypi/" target="_blank">Southampton Supercomputer</a>, with more room for the cables, with more space for cables. This is what we're going to try, for a very specific reason: easy mental mapping from the cluster layout to the display wall. The goal of this project, the SDSC Sandbox, is to teach parallel programming concepts to pre-college students, and the display wall provides a convenient mechanism to make distributed computing more tangible. By stacking the Raspberry Pis in the same physical arrangement (5 columns, 3 rows) as the LCD panels, it's easy to show the computers driving the displays. This layout isn't particularly efficient, but that's not the point.
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<h3>
Sketch Model</h3>
I am huge fan of sketch models: simple prototypes using disposable materials as a sanity check. Some of the best examples of these are in <a href="http://pbskids.org/designsquad/" target="_blank">Design Squad</a>. Design Squad is a reality show where high school students compete for a scholarship by building prototypes for various noble causes; it's about as close to the Raspberry Pi ideals as you can get. Every so often, the kids will get side tracked arguing, and one of the engineers leading the show will come in suggest they do a sketch model to get a feel for the idea. The end results are usually much improved by having a simplified model to hold.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWPNxz12gIe7aXErVtHmVu4nlxuJ5-aN4honJ7_781N2Bc_o7jdOU0k7q_CG8JSRxlDXO08RMyyXGXOg1y4Ctfnr9SVnrNOowZz8gORY_S_AK85SJy4YeaQ2an9FhZZB1Kk6ghbMUgbE/s1600/Photo+2013-04-21+06.58.56+PM.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWPNxz12gIe7aXErVtHmVu4nlxuJ5-aN4honJ7_781N2Bc_o7jdOU0k7q_CG8JSRxlDXO08RMyyXGXOg1y4Ctfnr9SVnrNOowZz8gORY_S_AK85SJy4YeaQ2an9FhZZB1Kk6ghbMUgbE/s320/Photo+2013-04-21+06.58.56+PM.jpg" width="320" /></a>Before I go out and buy some Plexiglas, threaded rod, and spacers, I wanted to see a couple of the Pis free floating in space using the mounting holes. As you might guess from the lead photo, the coat hanger provided the pillars for this. The platform is a cardboard lid that no longer has a box to cover.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieZPCxaylUgPuBl0txzpGEXKBNcPLbpUVlSxjq2PaxU_mh5DhBsL-VtPIAQKWz05BPpT6VlXA0kVyr-0FPIhUyogLkiD7A-_lD2TdXbWhnfI7WJfqNgnZve8h36FePZA0hJGN59bQTN18/s1600/Photo+2013-04-21+06.59.53+PM.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieZPCxaylUgPuBl0txzpGEXKBNcPLbpUVlSxjq2PaxU_mh5DhBsL-VtPIAQKWz05BPpT6VlXA0kVyr-0FPIhUyogLkiD7A-_lD2TdXbWhnfI7WJfqNgnZve8h36FePZA0hJGN59bQTN18/s320/Photo+2013-04-21+06.59.53+PM.jpg" width="320" /></a>
I used the fine sculptures in the previous image to punch through the lid from below, using a Raspberry Pi as a guide. Note the holes in the wrong spots caused by my laying down the Raspberry Pi upside down. This follows my motto of: "Measure once, cut twice, and make cheap prototypes".<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggEZL-YAe5ZrWTWxjus09kz79Zzw1ylIJzUa_cU-Ba-24oe-kmKHucJqCH8sUSK-6OLan185TlsjotWXLL35nEcD5LNAqP48ul3gnS1R2pyHgqC0C_rMoL_ahgcL89t0SGJf9WPgqI98w/s1600/Photo+2013-04-21+07.00.09+PM.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggEZL-YAe5ZrWTWxjus09kz79Zzw1ylIJzUa_cU-Ba-24oe-kmKHucJqCH8sUSK-6OLan185TlsjotWXLL35nEcD5LNAqP48ul3gnS1R2pyHgqC0C_rMoL_ahgcL89t0SGJf9WPgqI98w/s320/Photo+2013-04-21+07.00.09+PM.jpg" width="320" /></a>
Removing the Pi from the bottom, I taped the bent metal to the bottom of the lid.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuPPDsSjaonLoAHujNA7EullzPCDFu5I5wvzzDTyI87tBi5zAi5wEEnZgVK8E4SDyA67aNIBHKnvco22W_uX-dIQHRoJMNh2owSe3sqkbKkEmzAe70DA1ojxsSqlKg5a_vMhyqIO-a00M/s1600/Photo+2013-04-21+07.00.25+PM.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuPPDsSjaonLoAHujNA7EullzPCDFu5I5wvzzDTyI87tBi5zAi5wEEnZgVK8E4SDyA67aNIBHKnvco22W_uX-dIQHRoJMNh2owSe3sqkbKkEmzAe70DA1ojxsSqlKg5a_vMhyqIO-a00M/s320/Photo+2013-04-21+07.00.25+PM.jpg" width="320" /></a>
Flipping it over, I see the beginnings of a very inexpensive data center.
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqUIxh6p-rk_9EnzLRxlH3T6mxCoqcVQNYZZE4I4h-sBGR83o6B0VnwOBr3f5BUoWswoDmBiETLgo5X1VjbQ6BN7_J7QvxC1sT980f-fYAj_hBTUTxpHau3d_r5fqdsPfm9IKNM746Hik/s1600/Photo+2013-04-21+07.00.51+PM.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqUIxh6p-rk_9EnzLRxlH3T6mxCoqcVQNYZZE4I4h-sBGR83o6B0VnwOBr3f5BUoWswoDmBiETLgo5X1VjbQ6BN7_J7QvxC1sT980f-fYAj_hBTUTxpHau3d_r5fqdsPfm9IKNM746Hik/s320/Photo+2013-04-21+07.00.51+PM.jpg" width="240" /></a>The straws were cut up for spacers, and after stacking a single Pi, the first expected outcome is seen--the center of the mass of the Pi isn't between the mounting holes. This isn't a shock, since the Ethernet and USB ports are two of the biggest chunks of metal on the computer. Maybe if we put another on top, it will provide enough downwards to level it
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlSqOSe8IWOIhmjb0xQPmUcxZ3T90zVBfGzd6BwaCaIKoS2dEtdqByA6hVb3X17BVh6lo8rzhbBcrLWJFA9IaKXmgtSBi_LUOKxSlQatpdEGgnxw8Ei7HKPW50VgSMa-DYEyv3gscf8N8/s1600/Photo+2013-04-21+07.01.18+PM.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlSqOSe8IWOIhmjb0xQPmUcxZ3T90zVBfGzd6BwaCaIKoS2dEtdqByA6hVb3X17BVh6lo8rzhbBcrLWJFA9IaKXmgtSBi_LUOKxSlQatpdEGgnxw8Ei7HKPW50VgSMa-DYEyv3gscf8N8/s320/Photo+2013-04-21+07.01.18+PM.jpg" width="240" /></a>Yep. That totally fixed it. It even comes with dirty dishes to do after making a mess on the kitchen island.
<br />
<br />
Looking at the bottom Pi, this is pretty reassuring; it shows that very little force is required to level a Pi when held up by spacers. The next test is leveling the top Pi, and attaching a cable.
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj81yryDoTP8GYLZqFwu4GmNYbB1FPNqzisUKbmUWvUHD9Q0Pf_epd0xWXfzUeplpHkz-TBM1dz1TyCsaX0rNI8nrZeJdaSpN0SMJdBvOOE0YGuqbkA7iWUId_jMPQXD3bA4Vnqut30QdQ/s1600/Photo+2013-04-21+07.02.50+PM.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj81yryDoTP8GYLZqFwu4GmNYbB1FPNqzisUKbmUWvUHD9Q0Pf_epd0xWXfzUeplpHkz-TBM1dz1TyCsaX0rNI8nrZeJdaSpN0SMJdBvOOE0YGuqbkA7iWUId_jMPQXD3bA4Vnqut30QdQ/s320/Photo+2013-04-21+07.02.50+PM.jpg" width="240" /></a>Now, that's pretty ideal. The CAT5 cable on the left is a few feet long, and hanging over the edge of the island. The HDMI cable will be heavier, but I already planned on adding some posts or other supports at the rear of the rack for the video cables. That will help with both the weight and the torque from the bend. And with the clamps on the top, this arrangement was very stable.
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
The work to grab some materials and stack the Raspberry Pis took less time than writing this post, but it provided a ton in reassurance. At this point, I'm going work on a portable rack that has the switch at the bottom, and 5 sets of pillars to stack the Pis on. I figure some M2.5 standoffs will work, though will take a little time to get to the bottom Pi. Some all thread with spacers (maybe not straws) will also do, and a piece of polycarbonate held down with butterfly nuts would help stabilize the racks.
<br />
<br />
And I'm sure all this work will be appreciated by the rest of the team.
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgonipQGr1C2xA0J4Xmz4GAbG6H-NW76YLw4rX3kZAo_VRk-tcwTbInGITER58z9YovsV0pwoojlbo5ogQxSuayjt-GLsbkNhalGzqp5AeCaxQ1N0s50yfLiuiLJ8rxyN9yMg80l6PGj2c/s1600/Photo+2013-04-21+06.55.19+PM.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgonipQGr1C2xA0J4Xmz4GAbG6H-NW76YLw4rX3kZAo_VRk-tcwTbInGITER58z9YovsV0pwoojlbo5ogQxSuayjt-GLsbkNhalGzqp5AeCaxQ1N0s50yfLiuiLJ8rxyN9yMg80l6PGj2c/s400/Photo+2013-04-21+06.55.19+PM.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Students will volunteer to play video games. Who knew?</td></tr>
</tbody></table>
<br />Anonymoushttp://www.blogger.com/profile/02444046573847663353noreply@blogger.com0tag:blogger.com,1999:blog-2548403642798067966.post-32623938636818478572013-04-18T15:41:00.000-07:002013-04-18T15:41:10.251-07:00Parallel Pong on Raspberry PisWhen building a cluster computer, you need software to run on it. We thought that games would be a great demonstration and this lead us to embark on making the greatest game to ever come to distributed programming, pong.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGf4qpsyOm6AX2wMyUZl_T_3phg4Ih3erGNuNtDS5-hoXgzLmrGM5RPpgOItreIicbB-MteHxobcv4QLWPwMlKr2WlDSAOBycgaKNUqbpJgP4IkjGIPDvk2fg2mplE9CII5sIsAkxHr9k/s1600/2013-04-18+12.36.47.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGf4qpsyOm6AX2wMyUZl_T_3phg4Ih3erGNuNtDS5-hoXgzLmrGM5RPpgOItreIicbB-MteHxobcv4QLWPwMlKr2WlDSAOBycgaKNUqbpJgP4IkjGIPDvk2fg2mplE9CII5sIsAkxHr9k/s400/2013-04-18+12.36.47.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Everyone needs one of these</td></tr>
</tbody></table>
<div class="western" style="margin-bottom: 0in;">
<br />
<a name='more'></a>I decided that <a href="http://www.pygame.org/" target="_blank">pygame</a>
would be a good place to start. The pis come with the python and the module already
installed and a simple Google search of “pygame pong” landed
hundreds of open source results. I picked a <a href="http://www.pygame.org/project-py-pong-2040-.html" target="_blank">version</a> that was written well and begun to to
split the game into two parts, the game logic and the rendering
logic.
</div>
<div class="western" style="margin-bottom: 0in;">
<br /></div>
<div class="western" style="margin-bottom: 0in;">
The main logic ending
being a bit tricky to do. Pygame makes creating games easy but it
came at a cost for us. The original idea was to leave the main logic mostly
unchanged and just have it play the game at 9600x3600 (the resolution
of our 5x3 display wall). Unfortunately the game bounds were set by the display module in pygame. If you tried to pass in a resolution that is higher
then the screen, it will default to
the screen resolution. It wasn't really a fault of pygame, this sort
of logic makes sense in most applications, I was just trying to do
something unusual with it. To combat this I ended up taking out all
of pygame in the game logic. This meant a lose of collision detection,
coordinate systems, easy control listeners, image processing, and
pretty much everything that would make this a straightforward. To minimize
coding, I ended up just writing a coordinate system and collision
detection that mimicked pygame's own system, so most of the game
logic only had to be changed to call my functions not pygame's. It
wasn't as robust but it was sufficient for what I was trying to do.
When I was done, we had a version of pong that could be played at
any resolution but didn't actually render anything to the screen.<br />
<br />
While those changes were important to get the code running how I wanted it, I needed to get the game node to communicating with the rendering nodes. Python provides a simple way to do that, sockets. </div>
<pre class="brush: python">
ip_addresses = ( '10.10.0.10', '10.10.0.11', '10.10.0.12', '10.10.0.13',\
'10.10.0.14', '10.10.0.15' )
for x in range(0,len( clisocket )):
clisocket[x] = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
clisocket[x].connect((ip_addresses[x], 20000))</pre>
<div class="western" style="margin-bottom: 0in;">
<br />
In 5 lines, I now have open connections to all 6 raspberry pis powering a 3x2(we don't have enough pis for 5x3....yet) display wall. Once we get more pis, the top line will most likely read the addresses from a text file to make managing more addresses easier. For sockets you can see that all you do is create the object, then give it an ip address and port number and say connect. You now have a interface to comunicate with anything on your network. Using the sockets to pass data is also easy and can be done elegantly.<br />
<br />
<pre class="brush: python">
while game.running:
game.update()
posvect = struct.pack('iiii', game.ball.position_vec[0], game.ball.position_vec[1], \
game.paddle_left.rect.y, game.paddle_right.rect.y )
# loop over clients and send the coordinates
for x in range( 0,len( clisocket ) ):
clisocket[x].sendall( posvect )
# wait for them to send stuff back to avoid a race condition.
for x in range( 0,len( clisocket ) ):
clisocket[x].recv( 16 )</pre>
<br />
After the game is updated, the current position of all the important graphics are packaged into a binary byte array and sent to every socket. The game then stops and waits for a confirmation message from the rendering pis to say that they finished their job drawing the graphics and the game can now continue.<br />
<br />
The pis that are responsible for drawing the graphics are just small broadcast servers. Again, python makes this extremely easy and is achieved simply by defining a broadcast server class. The broadcast server takes advantage of two super classes. The threadingmixin class allows a server to be asynchronous on a small scale relatively easy. While this particular implementation doesn't take advantage of the threading in an interesting way(it was mainly used so you can have a separate thread listening for esc to end the server manually) it will be expanded upon in the next project as we hope to turn this specific pong render code to a much more general one that can be used with almost any game. Keeping the server in a thread will allow the pi to do other things, like contribute to the main game calculation, while it is waiting to receive the coordinates of the graphics. The TCPserver class allows it to have all the basic server functions in python. This sort of class inheritance made the actual code of the broadcast server easy, as the only work needed was to combine two classes into one.
<br />
<pre class="brush: python">
class broadcastServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
pass
</pre>
<br />
The TCPServer constructor requires a handler class with at the very least a handle function. The handle function is where the magic of pong happens. <br />
<pre class="brush: python">
def handle(self):
global screen, ball, ballrect, paddle_left_rect, paddle_right_rect, bounds,\
edge_node, paddle_index
posvec=self.request.recv(16)
while posvec !='':
pos = struct.unpack( 'iiii',posvec )
screen.fill( black )
if ( pos[0] > boundsx[0] and pos[0] < boundsx[1] ):
ballrect.x = pos[0] - boundsx[0] # offset the bounds
ballrect.y = pos[1] - boundsy[0]
screen.blit( ball, ballrect )
if edge_node:
if ( pos[paddle_index] > boundsy[0] and pos[paddle_index] < boundsy[1] ):
paddle_rect.y = pos[paddle_index] - boundsy[0]
screen.blit( paddle, paddle_rect )
pygame.display.flip()
try:
self.request.send( 'Got it' )
posvec=self.request.recv( 16 )
except:
posvec=''
print( 'client disconnect' )</pre>
<br />
The actual rendering is pretty easy once we get the coordinates, it simply checks if the position of the ball and paddles are in the bounds the render node is responsible for. If so, move the ball and draw it, if not, just draw black. The most interesting part about this code is actually the while loop. The while loop runs as long as posvec(position vector) isn't empty. Posvec is set to empty when the game logic node disconnects and the recv or send function throws an exception. The while loop is there because of the way the TCP server in python handles requests. Once a request is made by a socket and the handle function is run in it's entirety, it disconnects from the socket. Rather then constantly make a new conection every time the game updates, which would require first deleting the old sockets then making new ones and finally reconnecting them, the while loop keeps the server in the handle function until nothing is sent or received, thus keeping an open connection.
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4behuYx1qfeoQRZOpQ5Tesok_JznPTKJTSniVqbDQcCsPoI7HttujGhCPFW4iW5Tymmz-DLWEFrP96W0n1TpQDLJP83CfWn8DRf8XFXt8nC77ud1QmkVNwhEjOicwV97eM1d7N4ppLP8/s1600/2013-04-18+12.37.12.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4behuYx1qfeoQRZOpQ5Tesok_JznPTKJTSniVqbDQcCsPoI7HttujGhCPFW4iW5Tymmz-DLWEFrP96W0n1TpQDLJP83CfWn8DRf8XFXt8nC77ud1QmkVNwhEjOicwV97eM1d7N4ppLP8/s400/2013-04-18+12.37.12.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Everything is actually in a carefully planned space despite wires everywhere</td></tr>
</tbody></table>
The controls were done differently than just keyboard input, read our previous <a href="http://sdsc-sandbox.blogspot.com/2013/04/interfacing-zippyy-joysticks-with.html" target="_blank">post</a>. The source code is available on <a href="https://github.com/sdsc/sandbox-pong" target="_blank">github</a>.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG5ch1E2XKMDNEy7_Gyem7U6GrgwnTM6-PICd1Gu322XLwdqtNfLJJgxwYvdFPGnU8uPWiFBTPjLEb81I1A8m-6d7ViNB8muVAV4FvV2qSUDyxe3u_7UqcLXnrLfGrf45JNUvtmdwGlE4/s1600/2013-04-18+13.51.10.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG5ch1E2XKMDNEy7_Gyem7U6GrgwnTM6-PICd1Gu322XLwdqtNfLJJgxwYvdFPGnU8uPWiFBTPjLEb81I1A8m-6d7ViNB8muVAV4FvV2qSUDyxe3u_7UqcLXnrLfGrf45JNUvtmdwGlE4/s400/2013-04-18+13.51.10.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Productivity seems to have gone down lately for some reason....</td></tr>
</tbody></table>
<br /></div>
<div class="western" style="margin-bottom: 0in;">
<br /></div>
Anonymoushttp://www.blogger.com/profile/12880560337121828482noreply@blogger.com0tag:blogger.com,1999:blog-2548403642798067966.post-88820872537894833232013-04-17T17:46:00.000-07:002013-04-23T00:46:40.163-07:00Interfacing Zippyy Joysticks with the Raspberry Pi<div dir="ltr" style="margin-left: 1em; margin-right: 1em; margin-top: 0pt;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNlZa_cKzfdBBJ9xPOA7xpOczhL1sPub-hG_TCM6jdedYCUpIlSXoOkpFoW1lknXGHPDHGEk8VshEYGreMT3crq0iGSdy2Cd08EpbLz3Nw5BuX8FRSyXNztUAOWVGjHnmV7InBgTyEgI0/s1600/DSCN0630.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNlZa_cKzfdBBJ9xPOA7xpOczhL1sPub-hG_TCM6jdedYCUpIlSXoOkpFoW1lknXGHPDHGEk8VshEYGreMT3crq0iGSdy2Cd08EpbLz3Nw5BuX8FRSyXNztUAOWVGjHnmV7InBgTyEgI0/s320/DSCN0630.JPG" width="320" /></a></div>
In a later post, you'll read about a parallelized version of pong painted on a grid of computer screens. This sub-project was to interface <a href="https://www.sparkfun.com/products/9182">joysticks</a> up to a controlling node in the pong cluster and give it a classic cabinet feel. The only difference is that it is displaying on 15 screens! Until we got this working, we had to watch an AI enjoy the game.<br />
<br />
<a name='more'></a><br /><br />
Hacking joysticks together with the Raspberry Pi is pretty straightforward once you learn some basic properties of GPIO (General Purpose Input/Output) Pins on the Raspberry Pi. Since we used joysticks where each switch only had two terminals, opposed to three or four, we couldn't design a circuit where the GPIO pins were either grounded or sourced at all times. This means that either pin would be in an undecided state, unless assigned otherwise via software. To remedy this, we assigned the pull_up_down flag to a down state. This tells the Raspberry Pi to always ground the pin until a noticeable current flows through it. The end code was written in python, using the RPi.GPIO library, and can be seen below:<br />
<div style="line-height: 1.15;">
<br /></div>
<div style="line-height: 1.15;">
<pre class="brush: python">import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
# Note that the pin assignments in
# the code differ from the ones on the RP
# 7=4, 11=17, 13=27, 15=22
up0 = 7
down0 = 11
up1 = 13
down1 = 15
GPIO.setup(up0, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(down0, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(up1, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(down1, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
while 1:
#Print out commands
if GPIO.input(up0):
print "up0"
elif GPIO.input(down0):
print "down0"
if GPIO.input(up1):
print "up1"
elif GPIO.input(down1):
print "down1"
</pre>
</div>
<br />
This code was simply used to interface with the controllers. Once we received the desired behavior, we simply ported the code into the Pong game as a separate input thread. The RPi.GPIO library can be found on <a href="http://code.google.com/p/raspberry-gpio-python/wiki/Main" target="_blank">Google Code</a>. There's a short set of instructions on <a href="http://learn.adafruit.com/playing-sounds-and-using-buttons-with-raspberry-pi/install-python-module-rpi-dot-gpio" target="_blank">how to install RPi.GPIO library</a> on the <a href="http://adafruit.com/" target="_blank">Adafruit</a> site.</div>
<div dir="ltr" style="margin-left: 1em; margin-right: 1em; margin-top: 0pt;">
<br /></div>
<div dir="ltr" style="margin-left: 1em; margin-right: 1em; margin-top: 0pt;">
Writing the code gave us a pretty clear idea of the wiring setup:<br />
<ul>
<li>We have two terminal switch-board joysticks</li>
<ul>
<li>One switch per direction = Two switches per joystick = 8 wires</li>
</ul>
<li>Each switch would have current from the 3.3V GPIO pin running through a 22.3 Ohm resistor on one end separated from a wire connecting to a GPIO pin assigned to a paddle movement (ie. player one down).</li>
<ul>
<li>Closing the switch would complete the circuit making the forced down GPIO pin go up.</li>
</ul>
</ul>
The end result looked like this:<br />
<img height="301" src="https://lh4.googleusercontent.com/JoXxaU66Rlmg7KHzIA8ZxT_OiJQlhoN8icWklWXB8pcaUz_WmB5J_hLSGiG6tgByxiky-1gJBSQ5X5sS_A3BPV67bFkK0oqbRVOxHYvc7Oqmfy6r__8-0l1-" width="400" /><img height="272" src="https://lh6.googleusercontent.com/-yQOg9MmA9aK1ATVdI725IVCM5qemZn1g6025-UWLIr3gy5lvS1wHF-WBJw_rSQ782vGqv6inOmygviRPHutOZIuxooFrbakrBAErj6Lan7jpAf1O23Zzg80" width="400" /></div>
<b style="font-weight: normal;">
</b>
<br />
<div style="line-height: normal;">
</div>
<b style="font-weight: normal;">
</b>
Anonymoushttp://www.blogger.com/profile/12578244297587168784noreply@blogger.com0tag:blogger.com,1999:blog-2548403642798067966.post-92080744741214013352013-04-08T22:53:00.001-07:002013-04-23T00:47:10.449-07:00UCSD Triton Day 2013<div style="text-align: left;">
This Saturday, we moved the Sandbox into <a href="http://www.sdsc.edu/" target="_blank">SDSC</a>'s lobby for <a href="http://tritonday.ucsd.edu/" target="_blank">Triton Day</a>, <a href="http://www.ucsd.edu/" target="_blank">UCSD</a>'s open house for newly admitted students. We set up the OptIPortable that we've been using to try out building tiled displays with Raspberry Pis, since Erik's code (details in a later post) has reached the working demo stage. We thought it would be cool to let next year's students see what kind of things they can find on campus. Some of them had worked on some serious electronics projects in high school, including underwater autonomous vehicle and a <a href="http://nanoracks.com/">NanoRacks</a> experiment.
</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkMaQxK_qL_uoYKVNsq9UZarGyROc-f7KJfQ9F67T2ZtAI72qFD4V-PDFzldfWgEP4-mvDZ-QQlVtrkYNdh90vR6faJF9ZlczC8oO84dPE6LAKaUYwkJSgciiyr19G-eZBOD3NDm5nWIw/s1600/DSCN0642.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="SDSC Sandbox students working with Raspberry Pis." border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkMaQxK_qL_uoYKVNsq9UZarGyROc-f7KJfQ9F67T2ZtAI72qFD4V-PDFzldfWgEP4-mvDZ-QQlVtrkYNdh90vR6faJF9ZlczC8oO84dPE6LAKaUYwkJSgciiyr19G-eZBOD3NDm5nWIw/s400/DSCN0642.JPG" title="Amy, Alex, and Erik Hacking" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The SDSC Sandbox undergraduates (seated) working Raspberry Pis. From left: Amy, Alex, and Erik. </td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<a name='more'></a><br />
<div style="text-align: left;">
It was also a good chance for us to make progress on integrating different pieces, namely testing the joystick inputs (another thing you'll get to read about soon). By the end of the day, polling the micro switches was working and the breadboard was out of the picture.
</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw2bXWORMj7e5GDfLDW5TfogEJcWTeudEPrjVPbYLc3iO-82QaEK8Zzx5iNcOOwIik-8osaPxBfLf16Kv0SpM43-VS96ioYApRSriWNh5_zpQ0XWSZc_tmTOlJGT_Uskld8yeA6XvIcwY/s1600/DSCN0630.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw2bXWORMj7e5GDfLDW5TfogEJcWTeudEPrjVPbYLc3iO-82QaEK8Zzx5iNcOOwIik-8osaPxBfLf16Kv0SpM43-VS96ioYApRSriWNh5_zpQ0XWSZc_tmTOlJGT_Uskld8yeA6XvIcwY/s400/DSCN0630.JPG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"> Raspberry Pi in an awesome custom case, and joystick testing.</td></tr>
</tbody>
</table>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVijn9_siE99Vmy0YJzR-Jv7D-qqVI6btGJEhK4PvJPatBp-a3bzL816xJA55vUb7z76ZOpP5wsvATvGIxGrJY54lb0cSgxQVRekrJXPTJPHuAXWxx0Q95sN0spd8GWJLVV8EWcQXslNQ/s1600/DSCN0638.JPG" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVijn9_siE99Vmy0YJzR-Jv7D-qqVI6btGJEhK4PvJPatBp-a3bzL816xJA55vUb7z76ZOpP5wsvATvGIxGrJY54lb0cSgxQVRekrJXPTJPHuAXWxx0Q95sN0spd8GWJLVV8EWcQXslNQ/s400/DSCN0638.JPG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The case is self-cleaning.</td></tr>
</tbody></table>
<br />
<div style="text-align: left;">
It was a great day to meet the new students and their parents, and for us to work together for a while. I'm hoping some of those new students are interested in SDSC and will come back to find out what they can get involved with.
</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDk0sjffwuIpB8Dq0DHap4TRb8XOR1caiP6ffY2v_baxa7uKY7r5-dOfko1Op7DoGsxRsxfOF_kMW48z99ed46RrU60waVEDilskGUJqyXsI7A9eRN_g5_Obi25gUaCXei72GGJ6ZE6mA/s1600/DSCN0640.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDk0sjffwuIpB8Dq0DHap4TRb8XOR1caiP6ffY2v_baxa7uKY7r5-dOfko1Op7DoGsxRsxfOF_kMW48z99ed46RrU60waVEDilskGUJqyXsI7A9eRN_g5_Obi25gUaCXei72GGJ6ZE6mA/s400/DSCN0640.JPG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Make it work, then make it pretty. Clearly, we're still making it work.</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />Anonymoushttp://www.blogger.com/profile/02444046573847663353noreply@blogger.com0San Diego Supercomputer Center, University of California San Diego, 10100 Hopkins Drive, La Jolla, CA 92093, USA32.8843985 -117.2386478999999926.405275500000002 -127.56579639999998 39.363521500000004 -106.9114994