forked from swindonmakers/wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
159 lines (110 loc) · 12.7 KB
/
atom.xml
File metadata and controls
159 lines (110 loc) · 12.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Swindon Hackspace]]></title>
<link href="http://snhack.github.com/atom.xml" rel="self"/>
<link href="http://snhack.github.com/"/>
<updated>2013-04-15T20:09:38+01:00</updated>
<id>http://snhack.github.com/</id>
<author>
<name><![CDATA[Swindon Hackspace]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[Twitter To Teletype]]></title>
<link href="http://snhack.github.com/blog/twitter-to-teletype/"/>
<updated>2012-11-06T20:06:00+00:00</updated>
<id>http://snhack.github.com/blog/twitter-to-teletype</id>
<content type="html"><![CDATA[<p><em>cross posted from <a href="https://github.com/snhack/TwitterToTeletype/wiki">TwitterToTeletype/wiki</a></em></p>
<p>The <a href="http://www.museum-of-computing.org.uk/">Museum of Computing</a> in Swindon has a working Teletype and a desire to get it to print out tweets as part of a display in the museum. Since the <a href="https://groups.google.com/forum/?hl=en&fromgroups=#!forum/swindon-hackspace">Swindon Hackspace</a> is based in the museum it was a perfect project for hackspace members.</p>
<p><img src="https://github.com/snhack/TwitterToTeletype/wiki/images/Teletype.jpg" alt="Teletype" /></p>
<!-- more -->
<h1 id="current-loop-interface">Current Loop Interface</h1>
<p>The teletype uses a current loop interface to communicate with other (teletype) devices. The current loop interface is similar to a standard RS232 serial interface found on a PC except rather than using changes in voltage to represent 0’s and 1’s it uses changes in current. Data is sent at 110 baud - very slowly compared to modern standards, but this is as fast as the teletype can print characters and it has no means to buffer the data it receives.</p>
<p>After a few failed attempts and fried components a circuit was built to convert from RS232 serial into current loop using…. [ <em>what?, circuit diagram?, any more info?</em> ]</p>
<p><img src="https://github.com/snhack/TwitterToTeletype/wiki/images/CurrentLoopConverter.jpg" alt="Current Loop Converter" /></p>
<p>The teletype also uses a slightly different character set to standard ASCII so a character set conversion was required. This conversion implemented in the C# code running on the Raspberry Pi. This also allowed for use of some of the mechanical functions of the teletype such as the bell which you can hear ring as the teletype prints out a tweet</p>
<p><a href="https://github.com/snhack/TwitterToTeletype/wiki/images/TeletypeCharMap.png">Character Map Table</a></p>
<h1 id="mechanical-issues">Mechanical Issues?</h1>
<p>The teletype is mainly a mechanical device and contains only a single circuit board consisting of a few resistors, diodes and transistors <em>photo required</em> Many of the hardest problems to overcome turned out to be mechanical rather than electronic or software problems.</p>
<p>Upon initially managing to send data to the teletype over and RS232 port and via the current loop converter many characters were being printed out incorrectly. After reading the teletype manuals found online it was discovered that there was a mechanical adjustment lever at the back of the teletype which controlled the alignment of some cogs used in decoding the character data sent over the current loop. After a few minor adjustments with this lever most characters now print correctly.</p>
<p><img src="https://github.com/snhack/TwitterToTeletype/wiki/images/LeverPostion.jpg" alt="Lever Position" /></p>
<p>You may notice that the teletype still occasionally prints the wrong character. This is down to mechanical issues rather than any software or electronic fault and is simply due to the age of the machine and worn mechanical components.</p>
<h1 id="whats-with-all-the-noise">Whats With All The Noise?</h1>
<p>Because the teletype is a mechanical device which uses moving parts to decode the data it receives it has to be running continuously and hence makes a lot of noise even when not printing text. In order to minimize the noise generated when the teletype wasn’t printing anything a circuit was created using an ATTiny2313 (similar to the programmable chip used in an Arduino) and a relay to turn the power to the teletype on just before data was due to be sent and off once the printing was complete. This chip was also programmed to bridge the connection from USB on the Raspberry Pi to the serial data that was needed to send to the current loop converter to talk to the teletype.</p>
<p><img src="https://github.com/snhack/TwitterToTeletype/wiki/images/UsbSwitch.jpg" alt="USB Switch" />
<img src="https://github.com/snhack/TwitterToTeletype/wiki/images/UsbSwitch2.jpg" alt="USB Switch" /></p>
<h1 id="getting-tweets-and-putting-it-all-together">Getting Tweets And Putting It All Together</h1>
<p>A C# application was written to connect to the twitter API and pickup tweets sent to the museums twitter account. Running under Mono on Linux, this software then communicates with the ATTiny micro-controller via a USB to serial converter and sends instructions to turn the teletype on. It then sends the text of the tweet in 50 character chunks (due to memory limitations on the ATTiny) to be forwarded on to the current loop interface at 110 baud and finally the teletype prints out the tweet.</p>
<iframe width="" height="" src="http://www.youtube.com/embed/_HGV4Ppnx14 " frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
<p><img src="https://github.com/snhack/TwitterToTeletype/wiki/images/TeletypeComplete.jpg" alt="Complete" />
<img src="https://github.com/snhack/TwitterToTeletype/wiki/images/TeletypePaper.jpg" alt="Printing" /></p>
<h1 id="more-information">More Information</h1>
<ul>
<li><a href="https://groups.google.com/forum/?hl=en&fromgroups=#!forum/swindon-hackspace">Swindon Hackspace</a></li>
<li><a href="http://www.museum-of-computing.org.uk/">Museum of Computing</a></li>
<li><a href="http://en.wikipedia.org/wiki/Teletype_Model_33">Model 33 Teletype on Wikipedia</a></li>
<li><a href="http://en.wikipedia.org/wiki/Current_loop">Current loop on Wikipedia</a></li>
<li><a href="https://github.com/snhack/TwitterToTeletype">Source Code</a></li>
<li><a href="http://www.raspberrypi.org/">Raspberry Pi</a></li>
</ul>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Resources for Using Git]]></title>
<link href="http://snhack.github.com/blog/resources-for-using-git/"/>
<updated>2012-09-29T20:35:00+01:00</updated>
<id>http://snhack.github.com/blog/resources-for-using-git</id>
<content type="html"><![CDATA[<p><em>cross posted from <a href="http://jmeosbn.github.com/blog/resources-for-using-git/">http://jmeosbn.github.com</a></em></p>
<p>Here’s some basic resources to get started pushing code to github.</p>
<p>Note: As well as computer source code, git is useful for tracking changes to anything that can be represented as plain text, e.g. <a href="http://www.wired.com/wiredenterprise/2012/08/bundestag/">German Law</a>.</p>
<p>The simplest use of git is to create the repo locally, stored in the same folder as the source (known as the working tree) and named <code>.git</code>.</p>
<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>Initialise a new git repo </span><a href="http://git-scm.com/docs/git-init">git-init</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
</pre></td><td class="code"><pre><code class="sh"><span class="line"><span class="nv">$ </span><span class="nb">cd </span>my-project
</span><span class="line"><span class="nv">$ </span>git init
</span><span class="line">Initialized empty Git repository in my-project/.git/
</span></code></pre></td></tr></table></div></figure></notextile></div>
<!-- more -->
<p>Add any new or changed files you want to track, then commit those changes to the repo.</p>
<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>Add and commit changes </span><a href="http://git-scm.com/docs/git-add">git-add</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
</pre></td><td class="code"><pre><code class="sh"><span class="line"><span class="nv">$ </span><span class="nb">echo </span>About My-Project > README.md
</span><span class="line"><span class="nv">$ </span>git add . <span class="c"># add all files recursively</span>
</span><span class="line"><span class="nv">$ </span>git commit -m <span class="s1">'First Commit'</span>
</span><span class="line"><span class="o">[</span>master <span class="o">(</span>root-commit<span class="o">)</span> cdab15f<span class="o">]</span> First Commit
</span><span class="line"> 1 file changed, 1 insertion<span class="o">(</span>+<span class="o">)</span>
</span><span class="line"> create mode 100644 README.md
</span></code></pre></td></tr></table></div></figure></notextile></div>
<p>View recent commits using <code>git log</code>.</p>
<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>View recent commits </span><a href="http://git-scm.com/docs/git-log">git-log</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
</pre></td><td class="code"><pre><code class="sh"><span class="line"><span class="nv">$ </span>git log
</span><span class="line">commit cdab15f2036b0b8b1c8fbfceab6357c8e56a0d5f
</span><span class="line">Author: Jamie Osborne <jmeosbn@your-email.com>
</span><span class="line">Date: Sat Sep 29 23:30:20 2012 +0100
</span><span class="line">
</span><span class="line"> First Commit
</span></code></pre></td></tr></table></div></figure></notextile></div>
<h2 id="documentation">documentation</h2>
<p>Git itself can be installed from <a href="http://git-scm.com/downloads">git-scm.com</a> if your OS doesn’t already include it. The same site also hosts a copy of the <a href="http://git-scm.com/docs">documentation</a>, as well as the <a href="http://git-scm.com/book">Pro Git book</a> which is a great place to start learning git. Pro Git is also available as a commercially <a href="http://www.amazon.com/gp/product/1430218339?ie=UTF8&tag=prgi-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1430218339">printed book</a> from Apress, and as a free <a href="https://github.s3.amazonaws.com/media/progit.epub">ePub</a>, <a href="https://github.s3.amazonaws.com/media/pro-git.en.mobi">mobi</a>, or <a href="https://github.s3.amazonaws.com/media/progit.en.pdf">PDF</a> download.</p>
<p>If you don’t fancy reading an entire book, then this <a href="http://www.vogella.com/articles/Git/article.html">Git Tutorial</a> gets straight to the point for those already familiar with the concepts of version control. There’s minimal explanatory text, but full command examples for most operations; making it a useful resource for commands you use rarely and need to quickly relearn.</p>
<h2 id="graphical-interfaces">graphical interfaces</h2>
<p>While it’s good to know how to use git from the command line, it’s worth getting a GUI for easier building of commits etc. (you could also integrate it with your favourite editor and diff viewer)</p>
<p><a href="http://github.com/">Github</a> offers their own <a href="http://mac.github.com/">Mac</a> and <a href="http://windows.github.com/">Windows</a> GUI clients, which have the advantage of closer integration with some of github’s features, such as organisations and the “Clone in Windows/Mac” button found on each repo on github.</p>
<p><img class="center" src="http://mac.github.com/images/promo-screenshot.png" title="GitHub for Mac" /></p>
<p>They do lack some more advanced features though so I mostly prefer <a href="http://gitx.laullon.com/">GitX</a> on the Mac, though <a href="http://git-scm.com/downloads/guis">plenty more GUIs</a> exist on various platforms.</p>
<p><img class="center" src="http://gitx.laullon.com/commit.png" width="512" title="GitX" /></p>
<h2 id="other-info">other info</h2>
<p>Btw, if you just want to share some code snippets somewhere while maintaining versioning etc., then check out <a href="https://gist.github.com/">gists</a>, a feature of github.</p>
]]></content>
</entry>
</feed>