Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jeremy Ruston, Copyright © 2007-2011 UnaMesa Association
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser
Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])
<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]
----
Also see [[AdvancedOptions]]
<!--{{{-->
<div class='header' role='banner' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' role='navigation' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' role='navigation' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' role='complementary' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea' role='main'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}
h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}
.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}
.tabSelected {color:[[ColorPalette::PrimaryDark]];
background:[[ColorPalette::TertiaryPale]];
border-left:1px solid [[ColorPalette::TertiaryLight]];
border-top:1px solid [[ColorPalette::TertiaryLight]];
border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}
#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}
.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}
.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}
#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}
.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}
.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.tiddler .defaultCommand {font-weight:bold;}
.shadow .title {color:[[ColorPalette::TertiaryDark]];}
.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}
.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}
.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}
.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}
.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}
.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}
.imageLink, #displayArea .imageLink {background:transparent;}
.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}
.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}
.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}
.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}
.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}
.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}
#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:alpha(opacity=60);}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}
body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}
h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}
hr {height:1px;}
a {text-decoration:none;}
dt {font-weight:bold;}
ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}
.txtOptionInput {width:11em;}
#contentWrapper .chkOptionInput {border:0;}
.externalLink {text-decoration:underline;}
.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}
.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}
/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}
#mainMenu .tiddlyLinkExisting,
#mainMenu .tiddlyLinkNonExisting,
#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}
.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0; top:0;}
.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}
#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}
.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}
#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#messageArea a {text-decoration:underline;}
.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}
.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}
.tabset {padding:1em 0 0 0.5em;}
.tab {margin:0 0 0 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}
#contentWrapper {display:block;}
#splashScreen {display:none;}
#displayArea {margin:1em 17em 0 14em;}
.toolbar {text-align:right; font-size:.9em;}
.tiddler {padding:1em 1em 0;}
.missing .viewer,.missing .title {font-style:italic;}
.title {font-size:1.6em; font-weight:bold;}
.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}
.tiddler .button {padding:0.2em 0.4em;}
.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}
.footer {font-size:.9em;}
.footer li {display:inline;}
.annotation {padding:0.5em; margin:0.5em;}
* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0 0.25em; padding:0 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}
.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0 3px 0 3px;}
.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}
.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0; font-size:.9em;}
.editorFooter .button {padding-top:0; padding-bottom:0;}
.fieldsetFix {border:0; padding:0; margin:1px 0px;}
.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}
* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}
.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='toolbar' role='navigation' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
Buying and using peripherals for the Raspberry Pi is essential. The RPi itself doesn't even come with a power source so below is a list of peripherals and possible issues that may arise.
''Power Supply:''
The RPi power input is a micro usb input. You can use a mobile phone charger for this but in my opinion it's worth just making sure that you buy a PSU with your RPi.
The reason I chose to do this is because of much reading of the RPi acting a little strangely due to power issues. The Raspberry Pi is a relatively inexpensive product, however you are likely to invest significant time in working with it so why risk killing it with a sub-standard unit?
''Powered USB Hub:''
There are 2 USB ports on the RPi and so it's pretty easy to run out of them almost straight away with just a keyboard and mouse. Yes, you could see about bluetooth options but just a brief search seems to expose this as a difficult solution.
I bought a 7 port hub which leaves me with 6 ports now available after plugging in a keyboard and mouse.
''Keyboard & Mouse:''
I've had several of each plugged into my RPi with no issues. The beauty of linux is that it doesn't require drivers to be downloaded and installed every time you plug something in - the drivers are almost always there.
''Wifi Dongle:''
You can connect the RPi via it's LAN port (model b) but, for me, wifi was critical as I will be moving around with the RPi.
''General very important, potentially money saving and certainly //hair// saving advice wrt peripherals!:''
The website http://elinux.org/RPi_VerifiedPeripherals can give some help with choosing your peripherals and can give a good idea where you can expect to find trouble.
The main website also has a hub area for the Raspberry Pi available at: http://elinux.org/RPi_Hub.
''raspi-config''
On your first boot, the Raspberry Pi will go through a setup process which is a //not-very-pretty-but-refreshingly-not-microsoft-type-proprietary-set-up// quick and easy process.
Most of the settings are self evident but here's a few that are worth noting:
''Expanding the filesystem:''
Your SD card will be at least 2GB (because the OS will take up about 1.6GB) and you'll have likely bought one that is larger than 2GB.
Expanding your filesystem will ensure that you can make use of the full SD card. You've paid for that space so you may as well take it!
''Memory split''
There is 512MB of RAM available (model b) which is divided between the CPU and the graphics processor. If you're going to use your RPi as a media centre for example, the default 64MB will likely not be enough and so you can increase it. You can also reduce this if, for example you intend using the RPi as a headless server or something similar.
''SSH enable:''
SSH allows you to connect to your RPi from another machine. I've found this to be very handy as I can work on my laptop and have something compiling for install on the RPi but not have to keep going to the RPi itself and check it. You can just run your ssh connection and access the terminal - a very powerful tool.
''Boot to desktop:''
By default the RPi boots to a command line.... then it just sits there and unless you know to type in "startx" you might wonder when you'll get to see a user-friendly desktop with the giant raspberry in the background. You can choose to have the RPi do this for you though (it's not a lot of effort to type 6 letters and hit enter - but it's the small things that count!)
And that's pretty much it. Of course, you shouldn't limit your configuration to the items I've highlighted above, but I felt these are worth giving a bit more info on.
If you ever find that any of your settings are off you can open a terminal and type "//sudo raspi-config//" to open the same settings window.
''wlan''
Getting connected is necessary if you intend to do pretty much anything with your RPi. I have a wifi dongle for connecting mine and it gets a lot of use!
On the Raspberry Pi desktop you will see an icon for //WIFI Config// which opens a program called //wpa_gui//. This can also be accessed by selecting the LXDS equivalent to the windows "Start" button at the bottom left of the screen and selecting //wpa_gui// from the //Internet// menu.
To connect to your network it really is going to depend on your own network settings. I've had to go a few different ways with the networks I regularly connect to so I won't attempt to tell you exactly how to connect.
What I will say though is that much of the language used in network tools like //wpa_gui// is common with what you will find on your router. So, you should point your web browser on another machine to ''192.168.1.1'' and log into your router. Here, you should be able to find a menu for access control or wireless settings. You should be able to figure it out from there.
''I strongly advise going through the tutorial below''
Why? Well, because if, like me, you bought a 4GB SD card and then tried to download and install this, that, those and these, you quickly find that you have a whole load of stuff clogging up the SD card and finally your heart has a few minor palpitations when you hit a wall in how to deal with it.
So what I suggest is that you plug in a decent sized external hard drive (mine is 250GB) and partition it, format the partitions, plug it in and set your RPi up to put everything on it.
''And here's how!'':
You can format the hard drive using the //gparted//. This program can also be used to create partitions.
(gparted can be installed on your RPi by typing ''sudo apt-get install gparted'' in the command line of a terminal)
Start //gparted// by looking through the list of applications or by typing ''sudo gparted'' into the command line.
Once started, you will be shown the partitions available on the SD card. Choose //GParted > Devices// and select the device marked //sda//.
This will display the external hard drive.
Now we need to navigate //gparted// to create a new partition table by selecting //Device > Create Partition Table//.
Then finally we can create 2 partitions. One of these will be a linux swap partition and the other will become our new ''root'' directory to which all our files will be stored, allowing us to make use of the full size of our external hard drive.
The first (swap) partition will have the following settings:
|Partition |File System |Mount Point |Label |Size|
|/dev/sda1 |linux-swap |//(blank)// |swap |1000MB|
and the second will have:
|Partition |File System |Mount Point |Label |Size|
|/dev/sda2 |ext4 |/ |data |*******GB (the remaining space on the drive)|
I'll make this pretty simple and just insert a few screenshots of the process and describe what they do so you'll know for future reference.
First, identify the partitions you have created on the drive:
[<img[./images/sdalist.jpg]]
''sudo fdisk -l'' outputs the list of drives including your external hard drive. Here the external hd is listed by it's partitions //sda1, sda2, sda3 & sda4//. These can be mounted to the RPi and accessed once mounted.
@@clear:both;display:block; @@
[>img[./images/sdamount.jpg]]
In this image I am first creating mounting point ///mnt/EXTRoot// and mounting the partition ///dev/sda3// which is the partition to which I want to write all my installs to.
@@clear:both;display:block; @@
Next, I want to copy everything from the root directory in the SD card to my EXTRoot mounting on the external hard drive.
To do this, I used a tool called //rsync// which can be installed by typing ''sudo apt-get install rsync'' in the command line.
Once installed you can use this tool to copy all from the root directory on the SD card to the new root mounting on the external hard drive by typing:
''sudo rsync -avxS /mnt/EXTRoot'' into the command line.
Now we need to tell the RPi to use this external drive partition for the root filesystem.
To do this - it's a small edit to the ///boot/cmdline.txt// file specifies the location of the root filesystem.
Type ''sudo nano /boot/cmdline.txt'' into the terminal. This opens the txt file for editing where you can replace //root=/dev/mmcbkl0p2// with //root=/dev/sda2// the file. You will also need to add: //"boot_delay=100 rootdelay=10"// to the line of text. Below is the complete line of text as it appears in my own //cmdline.txt// file:
''dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda2 boot_delay=100 rootdelay=10 rootwait''
CTRL+X exits the file. You will be asked if you want to save changes - type Y. Then hit enter again to confirm the name of the file to save to.
[img[./images/sdacmdline.jpg]]
Another file which requires an edit is at ///etc/fstab//.
First, we need to know what format the drive partition is. To check this type ''blkid'' into the terminal. You should see your drive listed - the entry for "type" is going to be //ext4// if you have partitioned and formatted as advised above - take note of the the entry is as you will need this in the //fstab// edit.
Type ''sudo nano /etc/fstab'' into terminal and hit enter.
You will note that ///dev/mmcblk0p2// exists in this file. This is the root file of the SD card's partition. It is to be edited to replace ''mmcblk0p2'' with ''sda2''.
Again, ctrl+x exits the file and you must save changes for them to take effect.
Reboot the RPi by typing ''sudo reboot'' into the terminal.
''XBMC'' is a media centre application. Many Raspberry Pi users burn an image of ''OpenELECXBMC'' which is widely available. This is useful if you want to do little else with your RPi.
As a very viable alternative, I've installed XBMC separately and so it just runs as an application, leaving the Raspbian install intact.
And here's how:
Currently there is no official method of doing this and so, true to the spirit of the open source community, someone has figured it out and made their work available on a third party repository.
[>img[./images/add3partyrep.jpg]]
To add the repository you will be using the ''sudo bash'' command. While operating as ''root'' user you will be able to do things that you would not normally be able to.
This means that you must take //extreme care//. I always exit quickly from such access immediately so that you can remain safe.
@@clear:both;display:block; @@
Notice from the image that while you are operating as ''root'' you will notice that the username changes to ''root@raspberrypi:/home/pi#'' and the entire prompt is now white rather than green.
Once you have added the repository as in the image; ensure that you type ''exit'' to return to user ''pi''.
Now we can import the archive signing key:
[img[./images/ask.jpg]]
Now that we have added the repository (this is the linux equivalent of finding a new supplier of software) we can install the XBMC software.
First, type ''sudo apt-get update'' into the command line and hit enter.
After this update type ''sudo apt-get install xbmc'' and hit enter. You will be asked to confirm "Y".
XBMC will now appear in your applications list. Open XBMC for some configuration.
''Screen Size''
In XBMC select "System">"Settings">"System">"Video Output" and select "Video calibration....." from the menu.
[img[./images/xbmcsysset.jpg]]
The next screen provides little instruction but is uncomplicated. Floating the mouse over the centre displays a rectangle - follow the on screen instructions.
Next, we can set the top left corner. Put the mouse pointer to the very top left (this is possibly going to be off-screen), click and drag to reposition the top left corner.
Do the same for the bottom right corner.
The last position/sizing setting you need to complete is the subtitle position. Move your mouse to the centre bottom of the screen and move the highlighted subtitle bar to a height that suits you.
Going back a step or two in this menu will allow you to make other changes, though there is little you might need to do. Everything is pretty self-explanitory within the menus though so I won't go through every single setting.
''Streaming and Internet''
By returning back to the "System" menu you can choose "Services" to set up streaming and internet settings.
*Note: if you have an internet connection set up since your initial setup of the RPi you already have a connection. You may have noticed XBMC have some small pop-ups after opening which list add-ons being updated (across the connection).
Select ''UPnP'' and switch on video and music sharing and control. This will allow you to stream across your network to XBMC on your raspberry Pi. Particularly useful when you want to leave the RPi plugged into your TV.
Moving down to "Webserver" and allowing control of XBMC means that you can connect to a web interface (on another machine on the network) at 192.168.1.''32'':8080* and control XBMC from there.
*Note: 192.168.1.32:8080 is the IP address and port set for my own network. This won't be the same for you. First, the 8080 is set in the Webserver settings in XBMC - and the ''32'' in the IP address is going to be specific for your network. To find out the IP address for your RPi, open a terminal and type "ifconfig" and take the 192.168.1.** IP address listed under ''wlan0''
It's advisable to change your XBMC password also in the "Webserver" page.
There are a multitude of add-ons to trawl through for content, explore them to see if anything takes your fancy!
Something which might help with a few settings and some available content here:
http://www.makeuseof.com/tag/5-amazing-addons-xbmc-media-center/ or here: http://superrepo.org/plugin.video.free.cable/
You can also attach to Fusion by following the following tutorial:
http://www.xbmchub.com/blog/2012/04/24/fusion-easy-addon-installation-for-xbmc/
*Note: when entering the website address, it appears to be case sensitive for some reason - so enter it in //exactly// this format: http://FUSION.XBMCHUB.COM
*Note: All hardware will be different and so it's worth looking again at http://elinux.org/RPi_VerifiedPeripherals in order to ease the installation.
I got hold of a USB TV tuner that was a customer return and so was very very cheap. Of course it's not on the list of verified peripherals and so I've had to do something of a work-around in order to get it working.
With some research I found that the product (a //kworld// DVB-T2832) is based on fairly common internals; the RTL2832u chip.
Making good use of Google meant that I found a solution - and here it is:
email: tony[dot]canned[at]gmail[dot]com
''IR Light Barrier''
My final project is a modular and expandable IR light barrier which will network to the control PC of a CNC router.
The particular model of router will pause on hitting F10 on it's keyboard. I intend to have this command sent by the light barrier unit to pause the tool.
''Schedule as per "Week 16 - Planning and Implications"''
Design, mill, stuff and program arrays and Fabduino.
Design and process case sides.
Design and print case top & base.
Design and process mechanical adjustment.
Mill, stuff and program Fabduino.
Testing.
I have modified the LED array board using eagle (from "Output Devices" week) so that there is 10 IR LED emmiters.
Opposite this, I am using the same modified board and fitting IR receivers. (This turned out to be a mistake - see below)
''Problems:''
The reason I have used the LED array board as a basis for my design is because LED's scatter light. The scatter on the LED's I am using is 6 degrees. This means that at only a very short distance the spread will be wide enough to be seen by more than one receiver. This has a few possible solutions.
''Solution 1:''
By polarising the light from the LEDs it could be possible to ensure that each receiver can only "see" one emmiter.
Solution 2:
A kind of mechanical solution. Light travels in straight lines and so, by having small holes at each tower (see below for tower design) it is possible to narrow the beam available to the receivers.
Solution 3:
A coding solution. This is why I stuck with the charlieplexed LED array design. If all else fails, it would be possible to fire both an emmiter and a receiver for a few milliseconds then switch it off while the next pair fire. This would mean that only one pair would fire at any one time. However, by limiting the time for the pair to fire to a few milliseconds there would be no possibility of the light barrier being breached without it being noted.
''Coding requirements:''
Both sides of the IR barrier should have similar coding. Ideally, I need all LEDs on the emmitter side to be constantly on. On the other side the receivers should be LOW while they see the IR LED emmitters. The receivers need to "listen" for IR and when the barrier is broken, send an output to the Fabduino which completes the unit.
From here, the Fabduino is to send the F10 keyboard input to the CNC router PC to pause the machine.
So I started working on the hardware of the project first, leaving the programming until last.
''Design, mill, stuff and program arrays'' - I left the programming until later (after ensuring that I could flash something to the board.)
LED array edited to 10 IR LEDs and 10 IR receivers:
[img(600px+,450px+)[./images/finalIRLEDtrrc.jpg]]
''Design and process case sides''
The towers into which the IR LEDs and IR receivers are fitted:
[img(600px+,450px+)[./images/finaltowers.jpg]]
''Design and print case top & base''
Between issues with the 3D printer and taking a look at the design for the base and top I decided to look again at this part.
I chose to redesign and do a simple milled piece instead as this was much more time efficient and made use of some material which was otherwise heading for the bin.
''Design and process mechanical adjustment''
[img(500px+,600px+)[./images/finaladjust.jpg]]
''Mill, stuff and program Fabduino'' - again, I left the programming until last (after ensuring the initial flash was complete)
Fabduino built to control the IR light barrier:
[img(600px+,370px+)[./images/finalfabduino.jpg]]
''Achieving the coding:''
I've been struggling with this as the basis for the coding is from the "Output Devices" week:
http://academy.cba.mit.edu/classes/output_devices/array/hello.array.44.c
I know what I want to acheive but have been having trouble acheiving it.
''Code complete!''
The first piece of code that I worked on was getting the Arduino to send a keyboard command to the computer. I have tested this only on my laptop and it works.
The main issues I had here was searching for libraries for the Fabkit "Fabduino". After a lot of searching, I thought I was dead in the water because the libraries were only available for certain versions of Arduino unit and so I looked for another solution.
The solution I found was to use an interface, installed on Windows, called ''"GoBeTwino"''. Some code in the Arduino sketch is send to the designated COM port and the GoBeTwino program can perform actions with the command. GoBeTwino can be set up to sent email alerts, download from the internet, open programs and send keyboard command to the host machine (among other functions).
Below is the complete code for my FabKit Arduino unit:
{{{
int F10read; // variable to read in voltage from receivers
int value = 44; // 44 is the hex value for F10 to send to GoBeTwino
const int dataPin = 23; // Listen on this pin for receiver output
char buffer[5];
void setup() {
pinMode(dataPin,INPUT); // Set "listening" pin (23) to INPUT
Serial.begin(9600);
}
void loop() {
if(digitalRead(23)==HIGH){ // Send 'F10' using "GoBetwino" if INPUT pin gets signal from receiver
Serial.print("#S|SENDK|["); // All code here in standard brackets is
Serial.print(itoa((value),buffer,10)); // as per exaples provided
Serial.println("]#"); // with GoBeTwino software
}
}
}}}
''Receivers and problems:''
From speaking with Joel, he pointed out that the LED array is only possible because of the inclusion of diodes. So I had to modify my board on the receiver side. Given I was at home in Ireland and had no access to a Modela to recreate the receiver board, I instead took something of an "agricultural" approach!
Pins 9, 10, 11 & 12 of the ATTiny44 provided power to the IR receivers. I had to break their return to the ATTiny44 and instead route all to GND.
Below is an image of how the receiver board now looks after the modification.
[img(600px+,350px+)[./images/finalfarmfix.jpg]]
''Receiver Coding:''
The receiver coding will take some calibrating, and will likely need this in different lighting and distance configurations. Currently I have set it so that the receivers are on and that there is a reading taken from the receivers. Below a threshold will send a HIGH signal to the Fabkit Arduino.
{{{
// DDRA bytes for LEDs 1-10
byte portadirs[10] = {B00011000, B00010100, B00010010, B00010001,
B00011000, B00001100, B00001010, B00001001,
B00010100, B00001100};
// PORTA bytes for LEDs 1-10
byte portasets[10] = {B00001000, B00000100, B00000010, B00000001,
B00010000, B00000100, B00000010, B00000001,
B00010000, B00001000};
int receiveread; // variable to read in voltage from accelerometer
void setup() {
digitalWrite(1, HIGH); // activate receiver pin 12
digitalWrite(2, HIGH); // activate receiver pin 11
digitalWrite(3, HIGH); // activate receiver pin 10
digitalWrite(4, HIGH); // activate receiver pin 9
}
void loop() {
receiveread = analogRead(1); // read voltage from receiver pin 12
receiveread = analogRead(2); // read voltage from receiver pin 11
receiveread = analogRead(3); // read voltage from receiver pin 10
receiveread = analogRead(4); // read voltage from receiver pin 9
{
if(analogRead(1) < 100);
{digitalWrite(8,HIGH);}
if(analogRead(2) < 100);
{digitalWrite(8,HIGH);}
if(analogRead(3) < 100);
{digitalWrite(8,HIGH);}
if(analogRead(4) < 100);
{digitalWrite(8,HIGH);}
}
}
}}}
''Emmiter Coding:''
For the emmiter board I am sticking with the code we received for the LED array from the ''Output Devices'' week. I have removed 2 of the cycles included in the original code and modified the delay to be extremely short.
{{{
//
//
// hello.array.44.c
//
// Charlieplex LED array hello-world
//
// Neil Gershenfeld
// 11/13/10
//
// (c) Massachusetts Institute of Technology 2010
// Permission granted for experimental and personal use;
// license for commercial sale available from MIT.
//
#include <avr/io.h>
#include <util/delay.h>
#define output(directions,pin) (directions |= pin) // set port direction for output
#define input(directions,pin) (directions &= (~pin)) // set port direction for input
#define set(port,pin) (port |= pin) // set port pin
#define clear(port,pin) (port &= (~pin)) // clear port pin
#define pin_test(pins,pin) (pins & pin) // test for port pin
#define bit_test(byte,bit) (byte & (1 << bit)) // test for bit set
#define led_delay() _delay_ms(1) // LED delay
#define led_port PORTA
#define led_direction DDRA
#define A (1 << PA1) // row 1
#define B (1 << PA2) // row 2
#define C (1 << PA3) // row 3
#define D (1 << PA4) // row 4
#define E (1 << PA5) // row 5
void flash(uint8_t from, uint8_t to, uint8_t delay) {
//
// source from, sink to, flash
//
static uint8_t i;
set(led_port,from);
clear(led_port,to);
output(led_direction,from);
output(led_direction,to);
for (i = 0; i < delay; ++i)
led_delay();
input(led_direction,from);
input(led_direction,to);
}
void led_cycle(uint8_t number, uint8_t delay) {
//
// cycle through LEDs
//
uint8_t i;
for (i = 0; i < number; ++i) {
flash(B,A,delay);
flash(C,A,delay);
flash(D,A,delay);
flash(E,A,delay);
flash(A,B,delay);
flash(C,B,delay);
flash(D,B,delay);
flash(E,B,delay);
flash(A,C,delay);
flash(B,C,delay);
flash(D,C,delay);
flash(E,C,delay);
flash(A,D,delay);
flash(B,D,delay);
flash(C,D,delay);
flash(E,D,delay);
flash(A,E,delay);
flash(B,E,delay);
flash(C,E,delay);
flash(D,E,delay);
}
}
int main(void) {
//
// set clock divider to /1
//
CLKPR = (1 << CLKPCE);
CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0);
//
// main loop
//
while (1) {
led_cycle(100,10);
}
}
}}}
Overall I am happy with the results of the project. With respect to the hardware produced I am happy that I have designed intelligently, using parametric modeling for quick edits and scaleability. The project is also expandable due to the modular design methods I have used. It can be applied to a small or large area and is adjustable.
When it comes to the boards though, it was a significant oversight to apply the same board design and not consider that they required diodes. I had thought ahead in terms of a coding solution to the issue of light scatter but I had designed the receiver board without the ability to apply a coding solution if necessary.
That said, I have successfully set out to achieve what I wanted to and hope to develop further in the future - not specifically as a safety device but as potentially a home automation device. Along the way, I discovered GoBeTwino, which opens a lot of doors in terms of how to possibly apply home remote automation by email or text.
Assignment: design or modify a machine, making as many of the components as possible. document the group project and your individual contribution make the passive parts and operate it manually
Class Page: http://academy.cba.mit.edu/classes/mechanical_design/index.html
& http://academy.cba.mit.edu/classes/machine_design/index.html
Providence Tutorial: http://www.as220.org/fabacademy/tutorials/drawbot.php
Group:
Tony Canning
Loraine Clarke - http://academy.cba.mit.edu/2013/students/clarke.loraine/index.html
Roy Shearer - http://academy.cba.mit.edu/2013/students/shearer.roy/index.html
Thomas Bell - http://academy.cba.mit.edu/2013/students/bell.thomas/index.html
Graham Murdoch - http://academy.cba.mit.edu/2013/students/murdoch.graham/index.html
For this assignment we divided the work into categories, with my own responsibility being to build the case.
We were basing our design on the FabScan100: - http://hci.rwth-aachen.de/fabscan100
I decided to modify the design to remove the large amounts of screws included. I felt that building the case as a press-fit was not going to be too difficult to achieve and would reduce costs also.
Again, solidworks was invaluable in modelling the case and achieving a quality fit. I figured out the overall sizing from the FabScan100 files available on Github: https://github.com/francisengelmann/FabScan100/tree/master/lasercutter
I maintained the same relationships between the turntable, the laser and the camera unit and sized the rest of the case appropriately to house everything else in the press-fit design.
To test my design I took one of the most complex areas of the box and did some testing to before committing to the amount of material required to make the complete box:
[img(600px+,450px+)[./images/groupmoduletest.jpg]]
Once I tweaked the design to ensure a quality fit, I cut out the full unit, now ready for fitting of the rest of the project parts:
[img(600px+,450px+)[./images/gp1.jpg]]
[img(600px+,450px+)[./images/gp2.jpg]]
[img(600px+,450px+)[./images/gp3.jpg]]
Welcome to my Fab Academy website where my weekly work is documented.
Fab Academy will run until May 30th 2013 by which time I will have my Fab Academy project completed.
[[Home]]
[[Weekly Assignments]]
[[Group Project]]
[[Final Project]]
[[About Me]]
Here, I will outline how I have set up my Raspberry Pi.
Some sections are related to Fab Academy and others are useful for either personal use (media setups etc) or are general help and advice that you may find useful for your own setup.
I have come across some issues while going through this work and so I've had to go back to the start in some discovery of some sensible chronology on how to set up your RPi. This has resulted in being able to present this advice in an order you can apply it, expecting to produce the same results.
[[1: My RPi Peripherals]]
[[2: Settings on First Boot, WLAN Set Up]]
[[3: Mounting an External Hard Drive (and using it to host all your files)]]
[[4: Installing a Media Centre - XBMC]]
[[5: Turning RPi into a TV]]
Tony Canning - Fab Academy 2013
In the first week the following assignments were set:
Assignment 1: Plan and Sketch a potential Semester Project
Assignment 2: Build a Personal Site Describing you and your Final Project
Class Page: http://academy.cba.mit.edu/classes/principles_practices/index.html
& http://academy.cba.mit.edu/classes/project_management/index.html
Providence Tutorials: http://www.as220.org/fabacademy/tutorials/final_project_proposal.php (from the main tutorial page there is a tutorial for setting up Mercurial for each different operating system)
I've always had an interest in technology and just last year graduated from University of Limerick as a technology teacher (secondary level). I'm very much looking forward to engaging with the Fab Academy assignments and getting to apply my previous experience to a new experience.
I started late on the Fab Academy course and so am writing this at 5 weeks into the schedule. I've got some catching up to do!
I expect that my ideas on my final project will evolve but for now, I am considering a redesign and build of a "Pi-to-Go". (http://www.raspberrypi.org/archives/2848)
The project presents certain challenges and there are ideas I would like to incorporate also. I'd like to make the unit somewhat more practical, perhaps making it more netbook shaped (larger screen & keyboard, less width). I'm also considering the possibility of housing the screen in an expandable housing, to allow fitting of different screen sizes.
[img(600px+,450px+)[http://images.techhive.com/images/article/2012/12/raspberry-pi-to-go-inside-100019195-orig.jpg]]
A second project that I have considered is an Infrared light barrier. I think this would be quite a practical project which can include significant areas from the Fab Academy course. It can be built in a modular manner to account for different applications and can integrate electronics design, programming, networking and parametric modeling in its build. This particularly interests me as it is simething which can serve to showcase the capabilities of the FabLab environment more than the Pi-to-Go project.
The basic layout of the light barrier is to use IR LEDs emmitting from one side and IR receivers on the other. If the receiver sees IR from the emmitting side, the circuit is completed. Breaking the light barrier results in the control unit (arduino?) sending a command to the router control PC to pause it.
[img(600px+,450px+)[./images/layout.jpg]]
Assignment: measure something: add a sensor to a microcontroller board that you've made and read it
Class Page: http://academy.cba.mit.edu/classes/input_devices/index.html
Providence Tutorials: http://www.as220.org/fabacademy/tutorials/input_device_examples_C.php
& http://www.as220.org/fabacademy/tutorials/input_device_examples_ArduinoIDE.php
I chose to build a temperature sensor for this assignment.
As with all boards, the process begins on the Modela using the provided board design: http://academy.cba.mit.edu/classes/input_devices/temp/hello.temp.45.traces.png
And stuffing the board with the correct components: http://academy.cba.mit.edu/classes/input_devices/temp/hello.temp.45.png
The thermistor is basically a resistor which varies its resistance when effected by temperature changes, resulting in variations in voltage returned to the ATTiny45 chip.
The code (http://academy.cba.mit.edu/classes/input_devices/temp/hello.temp.45.c) and makefile (http://academy.cba.mit.edu/classes/input_devices/temp/hello.temp.45.make) can be downloaded and flashed to the ATTiny45 using the FabISP. The python file provided (http://academy.cba.mit.edu/classes/input_devices/temp/hello.temp.45.py) then reads from the temperature sensing board.
Finished board:
[img(600px+,400px+)[./images/inputtemp.jpg]]
I connected the temp sensor to the FabISP and to the FTDI cable and ran the hello.temp.45.py file.
This had to be run as sudo in order to access the port.
<html><iframe width="640" height="360" src="https://www.youtube.com/embed/vZGdCaHupPA?feature=player_detailpage" frameborder="0" allowfullscreen></iframe></html>
Assignment: design and make a 3D mold, and produce a fiber composite part in it
Class Page: http://academy.cba.mit.edu/classes/composites/index.html
Providence Tutorials: http://www.as220.org/fabacademy/tutorials/composites.php
For this assignment I used the Modela to mill a foam mold for a simple bowl. I had some cotton cord pants which were being used for patches so I decided I would use them to make the composite bowl.
The mold was designed in Solidworks as a 2 part mold. Soldiworks again lends itself to this as once the bowl itself is designed, it can be used to create negative space in a mold and also to providing data on volume, preventing some wastage of material.
With the mold milled out, I tried to seal the porous mold with paint but it had no effect. If I were doing it again I would layer on some cling film or something to prevent the resin seeping into any porous voids.
[img(600px+,450px+)[./images/compmodela.jpg]]
When I was ready to mix and pur the resin I made sure I was in an isolated but well ventilated area and was prepared to work quite quickly as the resin would harden after only about 5 minutes. The resin came as a 2 part mix and was mixed in a ratio of 1:1. I knew how much I needed to make as I had used solidworks to calculate the volume of the intended bowl.
I soaked the material in the resin to ensure that there would be no voids if it didn't soak in properly. I then placed the soaked material in the bottom of the mold and placed the top side of the mold gently on top. I then placed significant weight on top of the mold and allowed to harden.
[img(450px+,600px+)[./images/compremove.jpg]]
The result wasn't pretty and I don't think I'll be eating from this bowl!
But the main point was about strength of composite materials and so the bowl's ability to hold me up felt like a success:
[img(450px+,600px+)[./images/compstand.jpg]]
Assignment: write an application that interfaces with an input &/or output device
Class Page: http://academy.cba.mit.edu/classes/interface_application_programming/index.html
Providence Tutorials: http://www.as220.org/fabacademy/tutorials/interface_application_programming_processing.php
For this assignment I modified the code to the hello.temp.45.py file provided to us for the input devices assignment.
In looking at the code, there were a few things I wanted to change.
First I experimented with changing the colours in the file:
{{{
canvas = Canvas(root, width=.3*WINDOW, height=1*WINDOW, background='black')
canvas.create_text(.1*WINDOW,.125*WINDOW,text=".33",font=("arial", 24),tags="text",fill="#660066")
canvas.create_rectangle(.2*WINDOW,.05*WINDOW,.3*WINDOW,.2*WINDOW, tags='rect1', fill='#b00000')
canvas.create_rectangle(.3*WINDOW,.05*WINDOW,.9*WINDOW,.2*WINDOW, tags='rect2', fill='#000000')
}}}
After successfully acheiving colour changes, I went on to look at positioning of the measuring bar and text.
All coordinates are relative to the original WINDOW width and so changing the WINDOW value meant that the scale of the window and canvases could be changed. The only thing this wouldn't change is the text size.
I continued by playing around with the multipliers used with a static WINDOW value.
After this I took a long time looking at the orientation of the measurement bar and finally noticed the inclusion of "x" as a variable which defines the movement of the bar and its direction. I cahanged it to allow the bar to move vertically instead of horizontally:
{{{
x = int(.2*WINDOW + (.9-.2)*WINDOW*(filter-20.0)/10.0)
canvas.itemconfigure("text",text="%.2f"%filter)
canvas.coords('rect1',.2*WINDOW,x,.1*WINDOW,.2*WINDOW)
canvas.coords('rect2',.2*WINDOW,.9*WINDOW,x,.2*WINDOW)
}}}
Here is a video of the outcome:
<html><iframe width="640" height="360" src="https://www.youtube.com/embed/1YNzbsW1aiM?feature=player_detailpage" frameborder="0" allowfullscreen></iframe></html>
Assignment: add an output device to a microcontroller board and program it to do something
Class page: http://academy.cba.mit.edu/classes/output_devices/index.html
Providence Tutorial: http://www.as220.org/fabacademy/tutorials/output_device_examples.php
I decided to build the LED array output device.
PNG for Modela: http://academy.cba.mit.edu/classes/output_devices/array/hello.array.44.traces.png
Component layout: http://academy.cba.mit.edu/classes/output_devices/array/hello.array.44.png
C Code and Makefile: http://academy.cba.mit.edu/classes/output_devices/array/hello.array.44.c & http://academy.cba.mit.edu/classes/output_devices/array/hello.array.44.make
The board is milled, stuffed and flashed as per previous boards.
Prgramming the array to do something other than the original code is not particularly difficult. Essentially, each led in the array has an address which can be included or excluded in the code. Near the end, the instructions as to which section of code to run is included, along with pulse time and delay time in microseconds. By blocking out different parts of the code and experimenting with timings it's possible to figure out the effects of any change.
I began by trying to do my initials and once I was comfortable that I knew how this was acheived I programmed to spell my first name. I went on to experiment with flashing of the leds and combining this with the lettering.
[img(600px+,450px+)[./images/outputLEDarray.jpg]]
<html><iframe width="640" height="360" src="http://www.youtube.com/embed/-H-n4LLxca8?feature=player_detailpage" frameborder="0" allowfullscreen></iframe></html>
Assignment: build a wired &/or wireless network with at least two nodes
Class Page: http://academy.cba.mit.edu/classes/networking_communications/index.html
Providence Tutorial: http://www.as220.org/fabacademy/tutorials/networking_serial_bus.php
Bridge Traces:
PNG for Modela: http://academy.cba.mit.edu/classes/networking_communications/bus/hello.bus.45.bridge.traces.png
Component layout: http://academy.cba.mit.edu/classes/networking_communications/bus/hello.bus.45.bridge.png
Node Traces:
PNG for Modela: http://academy.cba.mit.edu/classes/networking_communications/bus/hello.bus.45.node.traces.png
Component layout: http://academy.cba.mit.edu/classes/networking_communications/bus/hello.bus.45.node.png
Code and Makefile:
C Code: http://academy.cba.mit.edu/classes/networking_communications/bus/hello.bus.45.c
MakeFile: http://academy.cba.mit.edu/classes/networking_communications/bus/hello.bus.45.make
The Code and Makefile is the same for each board with a small edit to allow the bridge and nodes to be identified for networking.
Look in the C code for the following line:
#define node_id '0'
In each node, this needs to be edited to identify uniquely the specific node by changing 0 to 1, 2, 3 etc.
The bridge board should be flashed as node 0. Use the following code to flash each of the nodes and the bridge:
sudo make -f hello.bus.45.make program-usbtiny
Now attach the bridge and nodes together and plug the bridge into your computer.
Open the Arduino IDE and select "Tools">"Serial Monitor" and set the baud rate to 9600.
In the serial monitor you can type in the number of any of the nodes and hit send.
All LEDs will flash once with the selected node flashing a second time as per the image below:
[img(600px+,450px+)[./images/network.jpg]] <html><iframe width="640" height="360" src="http://www.youtube.com/embed/xZfA-aLP8cs?feature=player_detailpage" frameborder="0" allowfullscreen></iframe></html>
Assignment: plan and document a final project that integrates the range of units covered
Class Page: http://academy.cba.mit.edu/classes/applications_implications/index.html
Questions:
what will it do?
The project will be a safety device suitable for applying to an array of applications. Essentially, an IR light barrier will monitor for being broken and output to a machine to pause it (the CNC Router in MAKlab pauses on keyboard input "F10")
who's done what beforehand?
There are many such devices available but they are quite costly. Many of them are built with a view to using on a specific machine.
what materials and components will be required?
Copper board for building circuits, components for stuffing (incl IR LED's and IR LED receivers), 2mm mdf (for housing & adjustment), FTDI cable, networking cable.
where will they come from?
RS components, MAKlab
how much will it cost?
Very low cost. Expecting to stay below €40.
what parts and systems will be made?
LED emitter and receiver arrays, fabduino. All casing and electronics.
what processes will be used?
Laser cutting, milling on modela, soldering, 3d printing, programming.
what tasks need to be completed?
Design, mill, stuff and program arrays.
Design and process case sides.
Design and print case top & base.
Design and process mechanical adjustment.
Mill, stuff and program Fabduino.
Testing.
what questions need to be answered?
Beam of LED emitters and visual scope of LED receivers needs to be addressed.
what is the schedule?
3 weeks.
Design array boards - 1 day
Mill boards - 1 day
Stuff boards - 1 day
Initial flash of all boards - 1 day
Design of case - 1 day
Processing case, top, base and mechanical adjustment - 2 days (depending on results from 3d printing and potential alternative process)
Programming and networking - 3 days
how will it be evaluated?
By stages:
Must send keyboard command to pause tool. (F10)
When no IR received, send keyboard command.
Programming and networking.
Individual parts functioning.
Assignment: develop a plan for dissemination of your final project
Class Page: http://academy.cba.mit.edu/classes/invention_IP_business/index.html
I have no intention of making any income from this project.
Because of this, and because I have used no work which is not available in an open source capacipty, there are no concerns with respect to intellectual property.
Once finished Fab Academy, I hope to further develop the project to allow it to be freely available.
assignment
work on your machine and final project, documenting your progress:
what questions need to be resolved?
what tasks need to be completed?
what has worked? what hasn't?
what will happen when?
what have you learned?
documentation during development
demand- vs supply-side time management
spiral development
Assignment: Model a possible final project.
Class Page: http://academy.cba.mit.edu/classes/computer_design/index.html
Providence Tutorials: http://www.as220.org/fabacademy/tutorials/inkscape.php
& http://www.as220.org/fabacademy/tutorials/3D_CAD.php
I used Solidworks to model my design on my potential final project. Solidworks is a powerful CAD tool in which several parametric modelling principles can be employed.
Applying parametric modelling principles can ease any future tweaking in any design. For example, instead of dimensioning two sides of a square, one can dimension just one and link the other side to that dimension. This ensures that by changing one dimension, the other will automatically change.
Functions can also be applied to linked dimensioning. So, if one wanted to create a rectangle which maintained a 2:1 ratio in the length of its sides, a function can be used to double the length of a side in relation to the other. More complex functions can also be applied.
Another feature which is very useful in Solidworks is applying "Global Variables". This can be very useful for press-fit design where kerf could account for 0.15mm, for example. Creating the Global Variable "kerf" with a value of 0.15mm means that the variable "kerf" can be called into any function also.
Below is a model of the housing for the light barrier which I expect will be my final project.
[img(800px+,450px+)[./images/case.jpg]]
Assignment: Design, make and document a press-fit construction kit.
Class Page: [[Computer Controlled Cutting|http://academy.cba.mit.edu/classes/computer_cutting/index.html]]
Providence Tutorials: [[ Using the Epilogue Laser Cutter|http://www.as220.org/fabacademy/tutorials/using_epilog_laser.php]] & [[Corel Draw|http://www.as220.org/fabacademy/tutorials/corel_draw_laser.php]] & [[Press Fit Tips|http://www.as220.org/fabacademy/tutorials/press_fit.php]]
Having recently bought a Raspberry Pi I though it would be a perfect opportuniy to make a case for it in press-fit construction.
Again, I modelled the case in Solidworks, from which individual faces of the 3D model can be saved as DXF files for use on the laser cutter.
Press fit kits are a good example of how the design process itself can be modular. By cutting a 2mm X 20mm slot for a 2mm X 20mm tab, you will find that the tab fits the slot loosely. A press fit kit needs to hold together without bonding or mechanical fittings.
Using a vernier callipers we can measure the slot and tab to see what the true cut size is. They will both measure differently from their design due to kerf. In the same way that a saw cutting through wood will remove material equivalent to the width of the blade, the same applies on a laser cutter.
Buy adjusting the slot size to account for kerf and re-checking, we can produce a fit that requires no bonding or mechanical jointing. It's a simpler job to decide that one element of the jointing will remain as originally designed - for example, in my designs I decided that the slots would be editted while the tabs remained as original size.
Attached are some dxf files used:
[[Folder of dxf files|./modeling/pressfit/]]
(*note: my hard drive died on me before I got this written up - the above files may not be the finished files I used and may need some edits if you want to use them)
Here is the finished item:
[img(600px+,450px+)[./images/rpipressfit.jpg]]
Assignment: Make the FabISP in-circuit programmer.
Class Page: [[Electronics Production|http://academy.cba.mit.edu/classes/electronics_production/index.html]]
Providence Tutorials: [[Building the FabISP|http://www.as220.org/fabacademy/tutorials/electronics_production_FabISP.php]] & [[Programming the FabISP|http://www.as220.org/fabacademy/tutorials/programming_FabISP.php]]
The FabISP programmer will be used to flash code to microcontrollers later in the Fab Academy course.
Producing the FabISP involves use of the Roland MDX-40 3D mill to produce the circuit board itself.
The MDX-40 requires vectors to create a toolpath. For this, the image available here: [[hello.ISP.44.traces.png traces|http://academy.cba.mit.edu/classes/embedded_programming/hello.ISP.44.traces.png]] is imported into the VCarve software and used to convert to vectors.
[img(350px+,600px+)[http://academy.cba.mit.edu/classes/embedded_programming/hello.ISP.44.traces.png]]
Different modes can be applied to the toolpath which can result in less machine time without compromising the quality of cut.
Once milled, the board is ready to be "stuffed" with components from the FabLab inventory. This layout shows where each component is to be soldered: [[hello.ISP. 44.png board layout|http://academy.cba.mit.edu/classes/embedded_programming/hello.ISP.44.png]]
[img(350px+,600px+)[http://academy.cba.mit.edu/classes/embedded_programming/hello.ISP.44.png]]
Now that the board is stuffed it can be attached to the AVRISP2 programmer which will be used to flash the firmware to the FabISP. The firmware is available here: [[Download firmware|http://academy.cba.mit.edu/classes/embedded_programming/firmware.zip]]
(*note: this assignment caused me an amount of pain! This was due to shorts burning out usb ports on my laptop. To protect your hardware it's worth considering getting a usb hub which should hopefully protect your equipment)
There is an excellent tutorial on programming the FabISP available here: [[Providence programming tutorial|http://www.as220.org/fabacademy/tutorials/programming_FabISP.php]]
I have been using Ubuntu for any command line work. I ran into some difficulties during the programming where I was getting errors that are pretty common.
Generally, most errors will come down to a short somewhere or an incomplete contact.
To troubleshoot, a multimeter can be used to check continuity. Refer to the images above to see which components should link together.
The finished FabISP:
[img(550px+,400px+)[./images/FabISP.jpg]]
Assignment: 3D scan an object. Design and 3D print an object.
Class Page: [[3D Scanning & Printing|http://academy.cba.mit.edu/classes/scanning_printing/index.html]]
Providence Tutorials: [[3D Scanning|http://www.as220.org/fabacademy/tutorials/3D_scanning.php]] & [[3D Printing|http://www.as220.org/fabacademy/tutorials/3D_printing.php}}
For this assignment I used the 3D scanner to scan a powered usb hub I have. I first covered the hub in masking tape as the scanner documentation advised that it sees white and matte surfaces most easily. The scan turned out to be quite good, and though the assignment didn't require it I wanted to see what edits I could make to it afterward.
I imported the scan into solidworks - the processing of the mesh is quite heavy and it took many attempts to get it to work. The reason I wanted it in solidworks is because for the 3D printing part of the assignment I wanted to make a kind of case that could cover the hub. By importing into solidworks I used the scan to hollow a 2 part case for the hub so that it would accomodate it with little movement.
The Ultimaker head needed replacing and so I only got one side of the cover created. I didn't bother doing the second side since as it has no real function beyond the assignment so didn't want to create waste.
Below are some images of the prepared USB hub:
[img(400px+,275px+)[./images/3dprintprep1.jpg]]
[img(400px+,275px+)[./images/3dprintprep2.jpg]]
And one side of the finished 3D print:
[img(400px+,275px+)[./images/3dprint1.jpg]]
[img(400px+,275px+)[./images/3dprint2.jpg]]
[img(400px+,275px+)[./images/3dprintusb.jpg]]
Assignment: redraw the echo hello-world board, add (at least) a button and LED (with current-limiting resistor), check the design rules, and make it
Class Page: [[Electronics Design|http://academy.cba.mit.edu/classes/electronics_design/index.html]]
Providence Toturial: [[Electronics Design|http://www.as220.org/fabacademy/tutorials/electronics_design_eagle.php]]
The echo hello-world board is available here: [[hello.ftdi.44.png|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.png]]
[img(400px+,400px+)[http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.png]]
Eagle PCB design software can be downloaded from: [[Linux, Windows & Mac Eagle download|http://www.cadsoftusa.com/download-eagle/]]
A set of libraries to be added to Eagle is available here: [[Fab Academy Eagle libraries|http://www.as220.org/fabacademy/tutorials/Downloads/eagle_libraries.zip]]
The providence tutorial is excellent to help set up Eagle.
Start by adding the components included in the echo hello-world to a schematic in Eagle. We also need to add a button and an LED.
Once all components are added to the schematic a "net" needs to be added to each input/output of each component that we would like to attach. Type "net" in the Eagle schematic and draw a short net at each point you wish to connect.
The net can be directly connected across components for simple circuits but a cleaner way to do it is to name each net. Type "name" when viewing the Eagle schematic and click on the net attached to the pin on the 6 pin header which corresponds to the GND pin in the board layout image. The pop up has a default name which can be changed - in this case - to "GND".
Now find the GND pin on the ATTiny44 in the schematic. Again, click on the net attached to this pin and rename the default name in the pop up to "GND".
Because these nets have both been named "GND", Eagle will now ask if these are to be connected. By answering yes, a connection is now made (this will not show up in the schematic).
Now, you can label the connected points. Type "label" into Eagle and select one of the nets you have named. The name will now be visible on that net and you can place the label beside it.
Creating names and labels can be done in any order, but I find that sticking to a defined order of net, name and label ensures that you are not going to miss any connections.
Repeat the above process to complete the schematic.
Once all connections have been made in the schematic, you can now create a board. An icon in the top menu can do this for you (just float your mouse pointer above the icons to see which one allows you to view a board).
[img(990px+,600px+)[./images/eagle.png]]
The first view of the board places all components at the bottom left. Typing "move" in Eagle will allow you to place the components wherever you wish on the board (within size limits as this is a free version of Eagle). Right clicking on a selected component allows you to rotate the component if necessary.
You will notice that a thin, amber coloured "air wire" shows the connections made in the schematic. Our aim is to replace these by routing traces between these connections.
It's likely that this will look messy when you initially place your components. To clean up after any move or rotation type "rats" into Eagle and it will become less jumbled. Now you can route the traces manually or use "auto" to route automatically. Routing automatically can produce results which include traces which are underneath the board. The autoroute dialog box which appears can be changed to ensure all routing occurs on top of the board.
Once each air wire has been routed as a trace, the board can be exported as an image (*.png or *.bmp) format. Before exporting, go into "View>Layers" to switch on only the layers you wish to see. This can then be taken to the Roland, converted to vectors and milled in the same way as the FabISP board.
[img(400px+,400px+)[./images/electronicsdesign.png]]
Once milled and stuffed, the board can be attached to FTDI serial to USB cable (drivers available [[here|http://www.ftdichip.com/Drivers/VCP.htm]] for your OS) and to your FabISP.
Bellow is different code (& associated Makefile) for the board:
[[hello.ftdi.44.echo.c|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.c]] & [[hello.ftdi.44.echo.c.make|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.c.make]]
[[hello.ftdi.44.echo.interrupt.c|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.interrupt.c]] & [[hello.ftdi.44.echo.interupt.c.makefile|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.interrupt.c.make]]
[[hello.ftdi.44.echo.asm|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.asm]] & [[hello.ftdi.44.echo.asm.makefile|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.asm.make]]
[img(400px+,275px+)[./images/electronicsdesignfinishedboard.jpg]]
Assignment: design a 3D mold, machine it, and cast parts from it
Class Page: http://academy.cba.mit.edu/classes/molding_casting/index.html
Providence Tutorial: http://www.as220.org/fabacademy/tutorials/machinable_wax_modela.php
Machinable wax can be used to make quite intricate plugs from which to create a mold. I used the Roland Modela to machine a simple Solidoworks object of to a chess piece. The wax was milled out in two parts using the Roland Modela.
[img(600px+,450px+)[./images/moldwax.jpg]]
The completed plug was then filled with a silicon solution producing a mold from which the machineable wax can be removed.
[img(600px+,450px+)[./images/moldsilicon.jpg]]
I cracked off the thinner sides of the machineable wax to free the silicon moldings.
[img(600px+,450px+)[./images/moldseperate.jpg]]
....and after filling with melted chocolate, allowed the molding to cool in the fridge.
[img(600px+,450px+)[./images/moldchoc.jpg]]
Assignment: read a microcontroller data sheet & program your board to do something
Class Page: [[Embedded Programming|http://academy.cba.mit.edu/classes/embedded_programming/index.html]]
Providence Tutorials: [[Arduino IDE|http://www.as220.org/fabacademy/tutorials/embedded_programming_arduinoIDE.php]] & [[Hello echo C program|http://www.as220.org/fabacademy/tutorials/hello_echo_c.php]] & [[Hello Fabduino|http://www.as220.org/fabacademy/tutorials/hello_arduino.php]]
The board used for this assignment is the one built in Week 6. I programmed it to fade up and down when the button it touched.
The starting code is available as a pair (C code & MakeFile) here:
[[hello.ftdi.44.echo.c|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.c]] & [[hello.ftdi.44.echo.c.make|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.c.make]]
[[hello.ftdi.44.echo.interrupt.c|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.interrupt.c]] & [[hello.ftdi.44.echo.interrupt.c.make|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.interrupt.c.make]]
[[hello.ftdi.44.echo.asm|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.asm]] & [[hello.ftdi.44.echo.asm.make|http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.echo.asm.make]]
I followed the Providence tutorial on how to program the board.
First, download the [[Arduino IDE|http://arduino.cc/en/Main/Software]] for your OS and follow the [[installation instructions|http://arduino.cc/en/Guide/HomePage]]
If you haven't already installed the FTDI drivers they are available [[here|http://www.ftdichip.com/Drivers/VCP.htm]]
The pin numbers are available from referring to the microcontroller data sheet (full sheet available [[here|http://www.atmel.com/Images/doc8006.pdf]]). Below is an image of the pin out details for the ATTiny44.
[img[http://avrhelp.mcselec.com/attiny24_44_84.png]]
The pins used on the ATTiny44 correspond to equivalent pins on Arduino. The issue is that these pins are in different positions. While their essential function on the IC remains, the pin is in a different position. We need to map these positions.
Here are the mapped positions (from Providence tutorial)
[img[http://www.as220.org/fabacademy/tutorials/images/embedded_programming/ATtiny44-84.png]]
Now we need to set up the downloaded Arduino IDE to recognise the ATTiny44 based FabISP. To do this, first download the [[board files|http://www.as220.org/fabacademy/tutorials/Downloads/attiny.zip]].
Open the Arduino IDE and select "File>Preferences" which will tell you the location of your Arduino Sketchbook folder. Navigate to this folder in your OS file manager and create a new folder called "hardware".
Now extract the downloaded board files and move the extracted files to the newly created "hardware" folder.
After restarting the Arduino IDE, go to "Tools>Board" and you will now see a list of Atmel chip names including the ATTiny44.
To program the board through Arduino the FabISP board needs to be connected by usb to your computer. The LED board also needs to be connected via an FTDI cable and the boards must be linked together via their 6 pin headers. Be sure you are connecting them correctly. If in any doubt, refer to the component layout of each board as provided in the earlier assignment weeks.
Once connected, you must select the target board from the "tools>board" menu. Because the board has a 20MHz external clock, ensure you choose this rather than the other ATTiny44 options.
Now you can select the programmer from "tools>programmer" to be "USBTinyISP". This is the FabISP programmer.
*Note: If you are using Ubuntu, you will need to follow the following instructions on the Providence tutorial page to ensure that you can run as sudo:
http://www.as220.org/fabacademy/tutorials/embedded_programming_arduinoIDE.php#runAsSudo
Now you can select "tools>burn bootloader" from the Arduino IDE. You should get a response saying "Done burning Bootloader" unless there is some connection issue or short.
Getting any kind of connection issue can mean one (or more) of the following:
Lack of connection on one or more boards (check for continuity)
Drivers not installed (check device manager/install/reinstall drivers)
Short (check for connections made shich should not be made)
Now the target board is ready to accept a program. For this we can modify an example sketch. A sketch is simply terminology for code in realtion to Arduino.
To open an example sketch select "File>examples>digital>button". Within this code we can search for the section which defines the pins for the button and the LED.
{{{
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
}}}
changing the constant for buttonPin from 2 to 3 and ledPin from 13 to 7 means that the sketch is now routed to provide power to the LED via the button.
Your code will now look like this:
{{{
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 3; // the number of the pushbutton pin
const int ledPin = 7; // the number of the LED pin
}}}
By selecting the right arrow at the top left of the Arduino IDE, the program is flashed to the target board and pushing the button will result in turning off the LED.
Here is the full example code which can now be modified. I modified the code to get the led to fade up and down when turning off and on.
{{{
/*
LED Off Until Button Pressed
Blinks a light emitting diode(LED) connected to digital
pin 7, when pressing a pushbutton attached to pin 3.
The circuit:
* LED attached from pin 7 to ground
* pushbutton attached to pin 3 from +5V
* 10K resistor attached to pin 3 to +5V
* 10K resistor pulls pin 3 and the button to HIGH by default
created 2005
by DojoDave
modified 30 Aug 2011
by Tom Igoe
modified for Hello Button + LED Board - 19 Mar 2012
by Anna Kaziunas France
*/
// constants won't change.
// They're used here to set pin numbers:
const int buttonPin = 3; // the number of the pushbutton pin
const int ledPin = 7; // the number of the LED pin
// initialize variables:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop(){
// read the state of the pin the pushbutton is connected to:
buttonState = digitalRead(buttonPin);
// is the push button pressed?
// if not pressed - the button state is HIGH
// the pull up resistor the button / pin 3 makes the button state HIGH by default.
if (buttonState == HIGH) {
// turn LED off (LED is off by default)
digitalWrite(ledPin, LOW);
}
//otherwise.....
// button is pressed
else {
// turn LED on:
digitalWrite(ledPin, HIGH);
}
}
}}}
In the above code, the function is for the chip to monitor the button for a digital signal. This means that it is expecting only an on or off and so the values available for the digitalRead variable is LOW or HIGH. Replacing the button with a dimmer switch would mean that you would have to change the digitalRead variable to analogRead in order to be able to monitor a changing signal of multiple values.
The digitalWrite variable ensures that the LED gets only a LOW or HIGH signal. In order to have the LED fade in and out, I changed this to an analogWrite variable and used a loop. The [[Arduino Reference for analogWrite|http://arduino.cc/en/Reference/AnalogWrite]] outlines the syntax and acceptable values for use with the variable.
My code asks for a digitalRead state of HIGH in order to begin an analogWrite cycle on the ledPin to a starting value of 5 and increasing by 5 through the loop function until 255 (max value) is achieved. The code then moves on to reduce the value by 5 through a loop until it reaches 0 again.
Below is the complete code:
{{{
/*
LED Off Until Button Pressed
Blinks a light emitting diode(LED) connected to digital
pin 7, when pressing a pushbutton attached to pin 3.
The circuit:
* LED attached from pin 7 to ground
* pushbutton attached to pin 3 from +5V
* 10K resistor attached to pin 3 to +5V
* 10K resistor pulls pin 3 and the button to HIGH by default
created 2005
by DojoDave
modified 30 Aug 2011
by Tom Igoe
modified for Hello Button + LED Board - 19 Mar 2012
by Anna Kaziunas France
*/
// constants won't change.
// They're used here to set pin numbers:
const int buttonPin = 3; // the number of the pushbutton pin
const int ledPin = 7; // the number of the LED pin
// initialize variables:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop(){
// read the state of the pin the pushbutton is connected to:
buttonState = digitalRead(buttonPin);
// is the push button pressed?
// if not pressed - the button state is HIGH
// the pull up resistor the button / pin 3 makes the button state HIGH by default.
if (buttonState == HIGH) {
// turn LED off (LED is off by default)
digitalWrite(ledPin, LOW);
}
//otherwise.....
// button is pressed
else {
// turn LED on:
digitalWrite(ledPin, HIGH);
}
}
}}}
In editing the code I looked at other participant's work so that I could fully understand it. I played with the following variables to change the code several times.
I've highlighted in the code below what the intended outcome was in each case.
{{{
void loop(){
// read the state of the pin the pushbutton is connected to:
buttonState = digitalRead(buttonPin);
// is the push button pressed?
// if not pressed - the button state is LOW
// the pull up resistor the button / pin 3 makes the button state LOW by default.
if (buttonState == LOW) {
// turn LED off (LED is off by default)
digitalWrite(ledPin, HIGH);
}
//otherwise.....
// button is pressed
else {
// turn LED on:
digitalWrite(ledPin, LOW);
}
}
}}}
The above changes the default state to have the LED on with the button press turning it off.
{{{
///Blink routine from arduino examples file
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(5000); // wait for 5 seconds
}}}
I edited the blink routine example several times to make small changes in off/on times. 1000 ms = 1 second.
Assignment: Make something big
Class Page: http://academy.cba.mit.edu/classes/computer_machining/index.html
Providence Tutorials: http://www.as220.org/fabacademy/tutorials/make_something_big_overview.php
This week's assignment targets computer controlled machining on the ShopBot. The ShopBot CNC mill can be thought of as a scaled up Modela.
For my assignment I made a simple stool, using press-fit principles. To design for the ShopBot (or any CNC mill) there are certain considerations which should be taken into account. For example, any slots cut will be the width of the router bit at a minimum. The width of the material also needs to be considered where jointing is concerned.
Below shows the shopbot processing from a sheet of 6mm ply:
[img(600px+,450px+)[./images/msbshopbot.jpg]]
The files used for the table are here:
[[Folder of dxf files|./modeling/msb/]]
The finished table:
[img(400px+,400px+)[./images/makesomethingbig1.jpg]] [img(400px+,400px+)[./images/makesomethingbig2.jpg]]
[[Week 1 - Principles & Practices; Project Management]]
[[Week 2 - Computer Aided Design]]
[[Week 3 - Computer Controlled Cutting]]
[[Week 4 - Electronics Production]]
[[Week 5 - 3D Scanning & Printing]]
[[Week 6 - Electronics Design]]
[[Week 7 - Molding and Casting]]
[[Week 8 - Embeded Programming]]
[[Week 9 - Computer Controlled Machining]]
[[Week 10 - Input Devices]]
[[Week 11 - Composites]]
[[Week 12 - Interface and Aplication Programming]]
[[Week 13 - Output Devices]]
[[Week 14 - Networking and Communications]]
Week 15 - Mechanical and Machine Design [[Group Project]]
[[Week 16 - Planning and Implications]]
[[Week 17 - Invention, Intellectual Property, and Income]]
[[Week 18 - Project Development]]
Week 19 - [[Final Project]]
var f=config.formatters[config.formatters.findByField("name","image")];
f.match="\\[[<>]?[Ii][Mm][Gg](?:\\([^,]*,[^\\)]*\\))?\\[";
f.lookaheadRegExp=/\[([<]?)(>?)[Ii][Mm][Gg](?:\(([^,]*),([^\)]*)\))?\[(?:([^\|\]]+)\|)?([^\[\]\|]+)\](?:\[([^\]]*)\])?\]/mg;
f.handler=function(w) {
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var floatLeft=lookaheadMatch[1];
var floatRight=lookaheadMatch[2];
var width=lookaheadMatch[3];
var height=lookaheadMatch[4];
var tooltip=lookaheadMatch[5];
var src=lookaheadMatch[6];
var link=lookaheadMatch[7];
// Simple bracketted link
var e = w.output;
if(link) { // LINKED IMAGE
if (config.formatterHelpers.isExternalLink(link)) {
if (config.macros.attach && config.macros.attach.isAttachment(link)) {
// see [[AttachFilePluginFormatters]]
e = createExternalLink(w.output,link);
e.href=config.macros.attach.getAttachment(link);
e.title = config.macros.attach.linkTooltip + link;
} else
e = createExternalLink(w.output,link);
} else
e = createTiddlyLink(w.output,link,false,null,w.isStatic);
addClass(e,"imageLink");
}
var img = createTiddlyElement(e,"img");
if(floatLeft) img.align="left"; else if(floatRight) img.align="right";
if(width||height) {
var x=width.trim(); var y=height.trim();
var stretchW=(x.substr(x.length-1,1)=='+'); if (stretchW) x=x.substr(0,x.length-1);
var stretchH=(y.substr(y.length-1,1)=='+'); if (stretchH) y=y.substr(0,y.length-1);
if (x.substr(0,2)=="{{")
{ try{x=eval(x.substr(2,x.length-4))} catch(e){displayMessage(e.description||e.toString())} }
if (y.substr(0,2)=="{{")
{ try{y=eval(y.substr(2,y.length-4))} catch(e){displayMessage(e.description||e.toString())} }
img.style.width=x.trim(); img.style.height=y.trim();
if (stretchW||stretchH) config.formatterHelpers.addStretchHandlers(img,stretchW,stretchH);
}
if(tooltip) img.title = tooltip;
// GET IMAGE SOURCE
if (config.macros.attach && config.macros.attach.isAttachment(src))
src=config.macros.attach.getAttachment(src); // see [[AttachFilePluginFormatters]]
else if (config.formatterHelpers.resolvePath) { // see [[ImagePathPlugin]]
if (config.browser.isIE || config.browser.isSafari) {
img.onerror=(function(){
this.src=config.formatterHelpers.resolvePath(this.src,false);
return false;
});
} else
src=config.formatterHelpers.resolvePath(src,true);
}
img.src=src;
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
config.formatterHelpers.imageSize={
tip: 'SHIFT-CLICK=show full size, CTRL-CLICK=restore initial size',
dragtip: 'DRAG=stretch/shrink, '
}
config.formatterHelpers.addStretchHandlers=function(e,stretchW,stretchH) {
e.title=((stretchW||stretchH)?this.imageSize.dragtip:'')+this.imageSize.tip;
e.statusMsg='width=%0, height=%1';
e.style.cursor='move';
e.originalW=e.style.width;
e.originalH=e.style.height;
e.minW=Math.max(e.offsetWidth/20,10);
e.minH=Math.max(e.offsetHeight/20,10);
e.stretchW=stretchW;
e.stretchH=stretchH;
e.onmousedown=function(ev) { var ev=ev||window.event;
this.sizing=true;
this.startX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
this.startY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
this.startW=this.offsetWidth;
this.startH=this.offsetHeight;
return false;
};
e.onmousemove=function(ev) { var ev=ev||window.event;
if (this.sizing) {
var s=this.style;
var currX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
var currY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
var newW=(currX-this.offsetLeft)/(this.startX-this.offsetLeft)*this.startW;
var newH=(currY-this.offsetTop )/(this.startY-this.offsetTop )*this.startH;
if (this.stretchW) s.width =Math.floor(Math.max(newW,this.minW))+'px';
if (this.stretchH) s.height=Math.floor(Math.max(newH,this.minH))+'px';
clearMessage(); displayMessage(this.statusMsg.format([s.width,s.height]));
}
return false;
};
e.onmouseup=function(ev) { var ev=ev||window.event;
if (ev.shiftKey) { this.style.width=this.style.height=''; }
if (ev.ctrlKey) { this.style.width=this.originalW; this.style.height=this.originalH; }
this.sizing=false;
clearMessage();
return false;
};
e.onmouseout=function(ev) { var ev=ev||window.event;
this.sizing=false;
clearMessage();
return false;
};
}
version.extensions.SwitchThemePlugin= {major: 5, minor: 4, revision: 1, date: new Date(2009,10,1)};
config.macros.switchTheme = {
handler: function(place,macroName,params) {
setStylesheet(".switchTheme {width:100%;font-size:8pt;margin:0em}","switchThemePlugin");
if (params[0] && (params[0].substr(0,6)=="width:")) var width=(params.shift()).substr(6);
if (params[0] && (params[0].substr(0,6)=="label:")) var label=(params.shift()).substr(6);
if (params[0] && (params[0].substr(0,7)=="prompt:")) var prompt=(params.shift()).substr(7);
if (params[0] && params[0].trim().length) // create a link that sets a specific theme
createTiddlyButton(place,label?label:params[0],prompt?prompt:params[0],
function(){ config.macros.switchTheme.set(params[0]); return false;});
else { // create a select list of available themes
var theList=createTiddlyElement(place,"select",null,"switchTheme",null);
theList.size=1;
if (width) theList.style.width=width;
theList.onchange=function() { config.macros.switchTheme.set(this.value); return true; };
this.refresh(theList);
}
},
refresh: function(list) {
var indent = String.fromCharCode(160)+String.fromCharCode(160);
while(list.length > 0){list.options[0]=null;} // clear list
list.options[list.length] = new Option("select a theme:","",true,true);
list.options[list.length] = new Option(indent+"[default]","StyleSheet");
list.options[list.length] = new Option(indent+"[random]","*");
var themes=store.getTaggedTiddlers("systemTheme");
for (var i=0; i<themes.length; i++)
if (themes[i].title!="StyleSheet" && !themes[i].isTagged('excludeLists'))
list.options[list.length]=new Option(indent+themes[i].title,themes[i].title);
// show current selection
for (var t=0; t<list.options.length; t++)
if (list.options[t].value==config.options.txtTheme)
{ list.selectedIndex=t; break; }
},
set: function(theme) {
if (!theme||!theme.trim().length) return;
if (theme=="*") { // select a random theme (except themes with "excludeTheme")
var curr=config.options.txtTheme;
var themes=store.getTaggedTiddlers("systemTheme");
if (!themes.length) return false;
var which=Math.floor(Math.random()*themes.length);
while (themes[which].title==curr
||themes[which].tags.contains('excludeTheme','excludeLists'))
which=Math.floor(Math.random()*themes.length);
theme=themes[which].title;
}
// apply selected theme
story.switchTheme(theme);
// sync theme droplists
var elems=document.getElementsByTagName("select");
var lists=[]; for (var i=0; i<elems.length; i++)
if (hasClass(elems[i],"switchTheme")) lists.push(elems[i]);
for (var k=0; k<lists.length; k++)
for (var t=0; t<lists[k].options.length; t++)
if (lists[k].options[t].value==config.options.txtTheme)
{ lists[k].selectedIndex=t; break; }
return;
}
}
if (config.options.chkRandomTheme===undefined)
config.options.chkRandomTheme=false;
if (config.options.chkRandomTheme)
config.macros.switchTheme.set("*");
if (Story.prototype.switchTheme_saved===undefined) { // only once
Story.prototype.switchTheme_saved=Story.prototype.switchTheme;
Story.prototype.switchTheme=function(t){
function run(t,s){
var f=store.getTiddlerText(store.getTiddlerSlice(t,s));
return f?eval('(function(){\n'+f+'\n})()'):false;
}
if (!startingUp && (run(config.options.txtTheme,'Reset')||run(t,'Check'))) return;
this.switchTheme_saved.apply(this,arguments);
run(t,'Init');
}
}