<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mike Silverman</title>
	<atom:link href="http://www.msilverman.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.msilverman.me</link>
	<description>documenting innovation at work</description>
	<lastBuildDate>Thu, 17 Nov 2011 17:57:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Sending Text Messages with Perl and Google Voice</title>
		<link>http://www.msilverman.me/2011/11/sending-text-messages-with-perl-and-google-voice/</link>
		<comments>http://www.msilverman.me/2011/11/sending-text-messages-with-perl-and-google-voice/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 15:12:01 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google voice]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[text message]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.msilverman.me/?p=577</guid>
		<description><![CDATA[It is much easier to send a SMS text message with Perl than you might think. You wouldn't know unless you searched but there is a module out there called Google::Voice. The module allows you to use your Google Voice account from Perl. It's not installed by default with Perl so you will need to [...]]]></description>
			<content:encoded><![CDATA[<p>It is much easier to send a SMS text message with Perl than you might think. You wouldn't know unless you searched but there is a module out there called <a href="http://search.cpan.org/%7Etempire/Google-Voice-0.05/lib/Google/Voice.pm">Google::Voice</a>. The module allows you to use your Google Voice account from Perl. It's not installed by default with Perl so you will need to install it. The easiest way to do this would be to type</p>
<pre class="brush: bash; title: ; notranslate">perl -MCPAN -e &quot;install Google::Voice&quot;</pre>
<p>This will install Google::Voice and all of it's dependencies.</p>
<p>Now to write a text message is so simple!</p>
<pre class="brush: perl; title: ; notranslate">
use Google::Voice;

#Google login info
my $username    = 'myuser@host.com';
my $password    = &quot;mypasword&quot;;

#text message info
my $send_number = &quot;14443216789&quot;;
my $send_text   = &quot;I'm a text message!&quot;;

#Do Not Edit Below Here!

#create Google::Voice object and login
my $gv_obj = Google::Voice-&gt;new-&gt;login($username, $password);

#send the text!
$gv_obj-&gt;send_sms($send_number =&gt; $send_text);
</pre>
<p>Now say you want to send a text message by calling the script from outside Perl. <span id="more-577"></span>i.e.</p>
<pre class="brush: bash; title: ; notranslate">sendtext.pl -p 14443216789 -t &quot;I'm a text message!&quot;</pre>
<p>Make sure the text is surrounded by quotes otherwise you will only be sending the first word.</p>
<p>The following code does just that.</p>
<pre class="brush: perl; title: ; notranslate">
use Google::Voice;
use Getopt::Long;
use strict;

#Set your login info here!
my $username    = 'myuser@host.com';
my $password    = &quot;mypasword&quot;;

#Do Not Edit Below Here!

my ($help_opt, $phone_opt, $text_opt);
GetOptions(&quot;h|help&quot;     =&gt; \$help_opt,
	   &quot;p|phone=s&quot;  =&gt; \$phone_opt,
           &quot;t|text=s&quot;   =&gt; \$text_opt,
          );
die &lt;&lt;HELP_MSG
sendtext.pl -p &lt;phone_number&gt; -t &lt;text message&gt;

usage:  -h     this help message
        -p     phone number you want to send to
        -t     text message to send
HELP_MSG
    #show help message if user types -h or does not include
    #phone number or text message text
    if (! $phone_opt or ! $text_opt or $help_opt);

#create Google::Voice object and login
my $gv_obj = Google::Voice-&gt;new-&gt;login($username, $password);

#send the text!
$gv_obj-&gt;send_sms($phone_opt =&gt; $text_opt);
</pre>
<p>There are other methods available in Google::Voice to allow you to interact with the service. I recommend reading the <a href="http://search.cpan.org/~tempire/Google-Voice-0.05/lib/Google/Voice.pm">documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msilverman.me/2011/11/sending-text-messages-with-perl-and-google-voice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Create a WordPress Plugin</title>
		<link>http://www.msilverman.me/2011/11/creating-a-wordpress-plugin/</link>
		<comments>http://www.msilverman.me/2011/11/creating-a-wordpress-plugin/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 19:09:13 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.msilverman.me/?p=393</guid>
		<description><![CDATA[Before creating a plugin it's helpful to determine the tools you need for your plugin to function and then determine how to integrate them into WordPress. In this guide I will be teaching by example. The plugin we will be creating is a simple post text replacement plugin. In the WP Admin panel we will [...]]]></description>
			<content:encoded><![CDATA[<p>Before creating a plugin it's helpful to determine the tools you need for your plugin to function and then determine how to integrate them into WordPress. In this guide I will be teaching by example. The plugin we will be creating is a simple post text replacement plugin. In the WP Admin panel we will be able to modify the search and replace parameters. We also will have a replacement color and toggle color. After some planning I've determined this plugin will require the following:</p>
<ol>
<li>jQuery : We need jQuery to toggle the class on our replacement text when clicked.</li>
<li>Database : We need our settings stored permanently. Of course you already have a database set up for WordPress. We will use that.</li>
<li>CSS : We will use two stylesheets, one for the admin side and one for the client side.</li>
<li>Custom Javascript: We're going to place our code in a separate file to show you how to load JavaScript on the admin side and the client side.</li>
</ol>
<p>As mentioned before we want the plugin to have an admin panel accessible from the WordPress panel. We also need to hook into posts/pages for our search matching.<br />
The following are WordPress documents that are essential for reference when creating a plugin. It will prove useful to have them bookmarked and opened in your browser at all times.<span id="more-393"></span></p>
<h3>WordPress Plugin Documents</h3>
<ol>
<li><a href="http://codex.wordpress.org/Plugin_Resources">Plugin Resources</a>: A top level page with links to all WordPress plugin related articles.</li>
<li><a href="http://codex.wordpress.org/Function_Reference">Function Reference</a> : List of all the WordPress functions, how to use them and what they do. Through these functions, mainly <em>add_action</em>, we are given a way to insert our own code into various points of WordPress' internal processes.</li>
<li><a href="http://codex.wordpress.org/Plugin_API/Action_Reference">Plugin API/Action Reference</a> : List of all the <em>add_action</em> hooks within WordPress. One example that we will be using is <em>admin_menu</em>. We will use this to add a new menu option in the the admin panel.</li>
<li><a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">wp_enqueue_script</a> : Scroll down to the bottom of this page. There is a list called "Default scripts included in WordPress." As it turns out  jQuery is included in WordPress. Though we still need to ensure that it is called for our page, we have one less script to worry about integrating. Check if your script is included before you worry about downloading it.</li>
</ol>
<h3>Create Plugin Directory and Files</h3>
<p>We are going to name our plugin Mikex. Make a directory called <em>mikex</em>. Place it in the  <em>wp-content/plugins/ </em>directory. <em></em>Within <em>wp-content/plugins/mikex/ </em>create these files:</p>
<ul>
<li>mikex.php : This will contain all of our hooks into WordPress. When our plugin is activated WordPress will look at this page before a page is loaded and execute all the code.</li>
<li>mikex.js : JavaScript to run client side</li>
<li>mikex.css : CSS used client side</li>
<li>admin.php : This will be our admin page in the WordPress control panel.</li>
<li>admin.js : JavaScript to run on admin side</li>
<li>admin.css : CSS used on admin side</li>
<li>update.php : Connects our admin.php changes to the database</li>
<li>functions.php : All of our functions are defined here.</li>
</ul>
<h3>The Code</h3>
<p>Each file is done separately. The code is commented well and any additional explanation is after the code. There are also links after each code block to the functions that were used.</p>
<h4>mikex.php</h4>
<p>For WordPress to recognize our plugin there is an obligatory header.</p>
<pre class="brush: php; title: ; notranslate">
/*
Plugin Name: Mike Example
Plugin URI: http://www.msilverman.me
Description: Example plugin for web tutorial
Version: 1.0
Author: Mike Silverman
Author URI: http://www.msilverman.me
License: GPl2
*/
</pre>
<p><a href="http://www.msilverman.me/wp-content/uploads/2011/11/mikex_plugin_menu.png"><img class="size-full wp-image-569 aligncenter" title="mikex_plugin_menu" src="http://www.msilverman.me/wp-content/uploads/2011/11/mikex_plugin_menu.png" alt="" width="506" height="55" /></a></p>
<p>In this file, if the plugin is activated, any code outside a function is executed when any WordPress page is loaded. For example if you put <em>echo "hello" </em>in the start of this file, you would see "hello" on every WordPress generated page. WordPress page content is generated at run time, it is not stored. That is why we will be storing our hooks into the posts and menu in this file outside of a function.</p>
<p>When the user activates the plugin we need a few things to happen. The first thing that needs to be done is allocate space in the database. At this point you have a decision to make:</p>
<p>In one direction we can use the functions <em>add_option</em> and <em>get_option </em>for all database interaction. The advantage of this method is you do not need to be familiar with database structure or query syntax. The option values are stored in longtext format which is approximately 4GB of text. If you are working with an array of data it will automatically be serialized to a storable format.</p>
<p>The other option is to use the dbDelta function, see <a href="http://codex.wordpress.org/Creating_Tables_with_Plugins">Creating Tables with Plugins</a>. This allows you to create your own table. If you are familiar with database structure, or want more control, this is the method to use. I'm going to assume that you are not a database expert and for this example we really don't need any complex relationships. We will use the <em>add_option/get_option</em> for this tutorial.</p>
<pre class="brush: php; title: ; notranslate">
/* We need to make sure our functions can be seen! */

include_once dirname(__FILE__) . '/functions.php';

/* The following events are not saved and must be executed on each page load */

register_activation_hook( __FILE__, &quot;mikex_activated&quot;);
register_deactivation_hook( __FILE__, &quot;mikex_deactivated&quot;);

/* This action will call the function to create a menu button */
add_action('admin_menu', 'mikex_add_menu_page');

/* This will load our admin panel javascript and CSS */
add_action('admin_enqueue_scripts', 'mikex_admin_scripts');

/* This will load the scripts on the client side for interaction */
add_action('wp_enqueue_scripts', 'mikex_client_scripts');

/* This shortcode allows us to run a function on the content of each post
   before it is displayed */
$options = get_option('mikex_opts');
add_shortcode($options['search'], 'mikex_replace_keyword');
</pre>
<p>Helpful links: <a href="http://codex.wordpress.org/Function_Reference/add_option">register_activation_hook</a> - <a href="http://codex.wordpress.org/Function_Reference/register_deactivation_hook">register_deactivation_hook  </a>- <a href="http://codex.wordpress.org/Function_Reference/add_action">add_action</a> - <a href="http://codex.wordpress.org/Shortcode_API">add shortcode</a> - <a href="http://codex.wordpress.org/Function_Reference/get_option">get_option</a> - <a href="http://codex.wordpress.org/Plugin_API/Action_Reference/admin_menu">admin_menu</a> - <a href="http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts">admin_enqueue_scripts</a> - <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">wp_enqueue_scripts</a></p>
<p>The <em>add_action</em> function takes two parameters, an action hook and a callback function. A hook specifies at which point in the page loading process you need to manipulate. All of the hooks are found in the <a href="http://codex.wordpress.org/Plugin_API/Action_Reference">Plugin API/Action Reference</a>. We want to modify the menu so we use the <a href="http://codex.wordpress.org/Plugin_API/Action_Reference/admin_menu">admin_menu</a> hook. The action hook <em>enqueue_scripts</em> will load our CSS and JavaScript. <a href="http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts">admin_enqueue_scripts</a> is used for for the admin side and <a href="http://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts">wp_enqueue_scripts</a> for the client side.</p>
<p>The <em>add_shortcode</em> function allows us to replace keywords in the post or page with content. The keyword WordPress will search for is in the form of the keyword surrounded by brackets: i.e. [keyword]. If I set the 'search' option in my example to "mikex" the keyword it will be searching for in the posts and pages is [mikex]. It will then use the return data of <em>mikex_replace_keyword</em> function to replace that keyword.</p>
<p>The callback functions we need to define later are <em>mikex_activated, mike_deactivated, mikex_add_menu_page, mike_admin_scripts, mike_client_scripts, </em>and <em>mikex_replace_keyword.</em></p>
<h4>mikex.js</h4>
<p>This will change the color of our replaced text when it is clicked.</p>
<pre class="brush: jscript; title: ; notranslate">
jQuery(document).ready(function() {
        //When the text span is clicked
        jQuery('.mikex-span').click(function() {

            //Define the newcolor
            newColor = jQuery(this).attr('newColor');

            //Change the color
            jQuery(this).css('color', newColor);
        });
});
</pre>
<h4>mikex.css</h4>
<p>This file is more for you than me. All we are doing is making the font size larger.</p>
<pre class="brush: css; title: ; notranslate">

.mikex-span {
    font-size: 3em;
}
</pre>
<h4>admin.php</h4>
<p>This file will be what you view when you click your plugin name in the admin panel. WordPress will load the page inside a div where all the other content appears.</p>
<p>My example is very simple. We get an array of the set options from the database. We then create a form which will be posted to <em>Update.php</em>. Using jQuery we have text appear saying "Updated" after submission. The text then disappears if the user focuses on an input box. The CSS is used for the form styling.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php $options = get_option('mikex_opts'); ?&gt;

&lt;b&gt;Mike Example!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;

&lt;form id=&quot;mikex-settings&quot; action=&quot;&lt;?php echo plugins_url('update.php', __FILE__) ?&gt;&quot;&gt;

    &lt;label&gt;Search Text:&lt;/label&gt;  &lt;input name=&quot;search&quot;  value=&quot;&lt;?php echo $options['search'] ?&gt;&quot; type=&quot;text&quot; /&gt;&lt;br /&gt;
    &lt;label&gt;Replace Text:&lt;/label&gt; &lt;input name=&quot;replace&quot; value=&quot;&lt;?php echo $options['replace'] ?&gt;&quot; type=&quot;text&quot; /&gt;&lt;br /&gt;
    &lt;label&gt;Replace Color&lt;/label&gt; &lt;input name=&quot;replace-color&quot; value=&quot;&lt;?php echo $options['replace-color'] ?&gt;&quot; type=&quot;text&quot; /&gt;&lt;br /&gt;
    &lt;label&gt;Toggle Color:&lt;/label&gt; &lt;input name=&quot;toggle&quot; value=&quot;&lt;?php echo $options['toggle'] ?&gt;&quot; type=&quot;text&quot; /&gt;&lt;br /&gt;
    &lt;input type=&quot;submit&quot; value=&quot;Update&quot; /&gt;&lt;span class=&quot;update-status&quot;&gt;&lt;/span&gt;

&lt;/form&gt;
</pre>
<p><a href="http://www.msilverman.me/wp-content/uploads/2011/11/mikex_admin.png"><img class="aligncenter size-full wp-image-567" title="mikex_admin" src="http://www.msilverman.me/wp-content/uploads/2011/11/mikex_admin.png" alt="" width="476" height="357" /></a></p>
<h4>admin.js</h4>
<pre class="brush: jscript; title: ; notranslate">
 jQuery(document).ready(function() {

    jQuery('#mikex-settings').submit(function() {
        var postURL = jQuery(this).attr('action');
        var serializedSettings = jQuery(this).serialize();

        //Post the serialized form data into the action URL in the form
        jQuery.post(postURL, serializedSettings);

        //Update the form stated to 'Updated!'
        jQuery('.update-status').text('Updated!');

        //We do not want our form submitted so we return false
        return false;
    });

    //Remove the 'Updated!' status when an input is focused upon
    jQuery('#mikex-settings input').focus(function() {
         jQuery('.update-status').text('');
    });

});
</pre>
<p>Helpful Links: <a href="http://api.jquery.com/serialize/">jQuery().serialize</a> - <a href="http://api.jquery.com/jQuery.post/">jQuery().post</a> - <a href="http://api.jquery.com/text/">jQuery().text</a></p>
<h4>admin.css</h4>
<p>The CSS used for the form.</p>
<pre class="brush: css; title: ; notranslate">

#mikex-settings input {
    margin-bottom: 20px;
    width: 10em;
}
#mikex-settings label {
    display: inline-block;
    font-size: 1.2em;
    width: 8em;
}
#mikex-settings .update-status {
    margin-left: 20px;
    font-size: 0.8em;
}
</pre>
<h4>update.php</h4>
<p>This is how we connect our admin changes to the database. The code in here is very simple.</p>
<pre class="brush: php; title: ; notranslate">
&lt;html&gt;
&lt;?php

require_once(dirname( __FILE__ ) . '../../../../wp-blog-header.php');

/* We are assuming that if a &quot;search&quot; value is being posted all the data is
   being posted. */

if (key_exists('search', $_POST)) {
    update_option('mikex_opts', $_POST);
}

?&gt;
&lt;/html&gt;
</pre>
<p>We must require the file <em>wp-blog-header.php</em> because that is where the <em>update_option</em> function is located. All the other code that we have used is called from a WordPress page so functions like <em>update_option</em> are already included.</p>
<h4>functions.php</h4>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/* Functions used by mikex.php */

function mikex_activated() {
	$mikex_version = 1.0;

/* These options are stored in the database. */
	add_option(&quot;mikex_version&quot;, $mikex_version);

	$default_opts = array('search' =&gt; 'searchtext',
			      'replace' =&gt; 'replacetext',
			      'replace-color' =&gt; 'replacecolortext',
			      'toggle' =&gt; 'togglecoor'
			      );
	add_option(&quot;mikex_opts&quot;, $default_opts);
}

function mikex_deactivated() {

/* We don't have anything to perform but you would put your deactivation
   functions here. */

}

/* add_menu_page creates a top level menu button. If you are looking for a
   menu button to place inside Settings use add_options_page */

function mikex_add_menu_page() {
    add_menu_page(&quot;Mike Example&quot;, &quot;Mike Example&quot;, &quot;activate_plugins&quot;, &quot;mikex&quot;, &quot;mikex_admin_page&quot;);
}

function mikex_admin_page() {
    include_once dirname(__FILE__) . '/admin.php';
}

/* Functions used by admin.php */

function mikex_admin_scripts() {

    /* Register and queue the Stylesheet */
    wp_register_style('mikex_admin_css', plugins_url('admin.css', __FILE__));
    wp_enqueue_style('mikex_admin_css');

    /* Register and queue the Javascript */
    wp_register_script('mikex_admin_js', plugins_url('admin.js', __FILE__));
    wp_enqueue_script('mikex_admin_js');

    /* Load the jQuery that is already included in WordPress */
    wp_enqueue_script('jquery');
}

function mikex_client_scripts() {

    /* Register and queue the Stylesheet */
    wp_register_style('mikex_css', plugins_url('mikex.css', __FILE__));
    wp_enqueue_style('mikex_css');

    /* Register and queue the Javascript */
    wp_register_script('mikex_js', plugins_url('mikex.js', __FILE__));
    wp_enqueue_script('mikex_js');

    /* Load the jQuery that is already included in WordPress */
    wp_enqueue_script('jquery');

}

/* Functions used for posts */
function mikex_replace_keyword() {

    /* Retrieve our settings */
    $options = get_option('mikex_opts');

    /* If we want to create more complex html code it's easier to capture the output buffer and return it */
    ob_start(); ?&gt;
        &lt;span class=&quot;mikex-span&quot; newColor=&quot;&lt;?php echo $options['toggle'] ?&gt;&quot; style=&quot;color: &lt;?php echo $options['replace-color'] ?&gt;;&quot;&gt;&lt;?php echo stripslashes($options['replace']) ?&gt;&lt;/span&gt;
&lt;?php
    /* Return the buffer contents into a variable */
    $new_content = ob_get_contents();

    /* Empty the buffer without displaying it. We don't want the previous html shown */
    ob_end_clean();

    /* The text returned will replace our shortcode matching text */
    return $new_content;
}

?&gt;
</pre>
<p>Helpful Links: <a href="http://php.net/manual/en/function.ob-start.php">ob_start</a> - <a href="http://www.php.net/manual/en/function.ob-get-contents.php">ob_get_contents</a> - <a href="http://www.php.net/manual/en/function.ob-end-clean.php">ob_end_clean</a> - <a href="http://codex.wordpress.org/Function_Reference/wp_register_script">wp_register_script</a> - <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">wp_enqueue_script</a> - <a href="http://codex.wordpress.org/Function_Reference/wp_register_style">wp_register_style</a> - <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_style">wp_enqueue_style</a> - <a href="http://codex.wordpress.org/Function_Reference/plugins_url">plugins_url</a></p>
<p>In <em>mikex_activated</em> the <em>add_option </em> does not do anything if the option exists. Our <em>mikex_opts </em>option will not be deleted if the user is activating/deactivating our plugin.</p>
<p>In <em>mikex_add_menu_page</em> it is important to pay attention to the <em>activate_plugins</em> parameter. This is where you define who can see the menu. I only want someone who can activate a plugin to be able to modify the plugin settings. To see the other options view the <a href="http://codex.wordpress.org/Roles_and_Capabilities">Roles and Capabilities</a>. There is another function called <em>mikex_admin_page</em> which is the actual code that will be displaying in the admin page. Rather than defining it here we're going to include the <em>admin.php</em> file we created earlier.</p>
<p>When adding JavaScript or CSS we must first make sure the script or style is registered and then queue it to be loaded.  Make sure for a style you are using the<em> wp_register_style</em> and <em>wp_register_script</em> for the script. They look the same at a quick glance. We did not need to register jQuery because we found earlier that is is included with WordPress. Using the name specified in the <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">wp_enqueue_script</a> we just need to queue it.</p>
<p>In the <em>mikex_replace_keyword</em> function what is returned will replace the keyword we specified earlier. It is much easier and cleaner to us <em>ob_start</em> and specify the php/html then doing things like <em>echo "&lt;span class=\"mikex-span\"&gt;"</em>.</p>
<h4>Conclusion</h4>
<p>You now have a strong foundation for creating a WordPress plugin! I hope this was helpful. I can answer any questions and try to help those struggling. Leave a comment or <a href="http://www.msilverman.me/contact/">e-mail me</a>.</p>
<p>I'm using the plugin here,         <span class="mikex-span" newColor="orange" style="color: green;">Click Me!</span>
 I know you want to.</p>
<p>If you want to use my zip file as a base and work from there you can download it here <a href="http://www.msilverman.me/wp-content/uploads/2011/11/mikex_plugin.zip">mikex_plugin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msilverman.me/2011/11/creating-a-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Convert PDF to FDX: PDF to Final Draft</title>
		<link>http://www.msilverman.me/2011/11/pdf-to-fdx-pdf-to-final-draft/</link>
		<comments>http://www.msilverman.me/2011/11/pdf-to-fdx-pdf-to-final-draft/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 03:15:08 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.msilverman.me/?p=378</guid>
		<description><![CDATA[For the movie writers out there I created a program to convert a Final Draft PDF back into a Final Draft editable file. I'm now determining the best way to distribute the software. It will be at trial for the first 500 lines and a small fee for the whole script with unlimited usage. If [...]]]></description>
			<content:encoded><![CDATA[<p>For the movie writers out there I created a program to convert a Final Draft PDF back into a Final Draft editable file. I'm now determining the best way to distribute the software. It will be at trial for the first 500 lines and a small fee for the whole script with unlimited usage. If you need a script converted immediately <a href="mailto:mike@msilverman.me">email me</a> and we can work something out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msilverman.me/2011/11/pdf-to-fdx-pdf-to-final-draft/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Website Showcase: IAmMattSilverman.com</title>
		<link>http://www.msilverman.me/2011/10/website-showcase-iammattsilverman-com/</link>
		<comments>http://www.msilverman.me/2011/10/website-showcase-iammattsilverman-com/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 18:50:40 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.msilverman.me/?p=367</guid>
		<description><![CDATA[I'm becoming very good friends with WordPress. I just finished coding version 1.0 of IAmMattSilverman.com. A website for the talented Matt Silverman. Features of the site include facebook integration and a custom module for showcasing videos. Facebook integration was done using the Graph API and Real Time Updates. The real time updating proved to be [...]]]></description>
			<content:encoded><![CDATA[<p>I'm becoming very good friends with WordPress. I just finished coding version 1.0 of <a href="http://www.IAmMattSilverman.com">IAmMattSilverman.com</a>. A website for the talented Matt Silverman. Features of the site include facebook integration and a custom module for showcasing videos. Facebook integration was done using the Graph API and Real Time Updates. The real time updating proved to be a challenge. Facebook's documentation is not the best on this topic. I plan on creating a nice outline of the what you need to know and how to use it so look forward to that in the coming days. Meanwhile check out the <a href="http://www.iammattsilverman.com">website</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msilverman.me/2011/10/website-showcase-iammattsilverman-com/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Template Design</title>
		<link>http://www.msilverman.me/2011/08/wordpress-template-design/</link>
		<comments>http://www.msilverman.me/2011/08/wordpress-template-design/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 02:02:49 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.msilverman.me/?p=362</guid>
		<description><![CDATA[These days I have been doing more web design and scripting than anything else. I recently finished designing a new website for Hillel at Northeastern University. Hillel is an organization I am very active in. I strongly believe in giving back to the community and this website is one of the ways I am able [...]]]></description>
			<content:encoded><![CDATA[<p>These days I have been doing more web design and scripting than anything else. I recently finished designing a new website for Hillel at Northeastern University. Hillel is an organization I am very active in. I strongly believe in giving back to the community and this website is one of the ways I am able to do that. I'm currently working on customizing SugarCRM to fit our needs.</p>
<p>The backend of the website is WordPress. The template is fulled integrated into the admin panel. I may at some point outline the steps involved in making a template. In the meantime, you must check out <a title="Lynda" href="http://www.northeasternhillel.org/">Lynda.com</a>. Their tutorials are amazing. This is the first WordPress template I designed. The video tutorial from Lynda answered many questions I had.</p>
<p>I would be happy to detail any WordPress template questions anyone has.</p>
<p><a href="www.northeasternhillel.org">Check out the website!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.msilverman.me/2011/08/wordpress-template-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The answer to losing your keys</title>
		<link>http://www.msilverman.me/2011/04/the-answer-to-losing-your-keys/</link>
		<comments>http://www.msilverman.me/2011/04/the-answer-to-losing-your-keys/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 04:03:54 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://www.msilverman.me/?p=333</guid>
		<description><![CDATA[Radio Frequency Identification, or RFID, is a technology slowly being incorporated more and more into daily life. The uses for RFID are endless as the technology becomes smaller, cheaper and more versatile. If you don’t know what RFID is, you'll soon find out! RFID is a wireless identification system that can be viewed like a [...]]]></description>
			<content:encoded><![CDATA[<p>Radio Frequency Identification, or RFID, is a technology slowly being incorporated more and more into daily life. The uses for RFID are endless as the technology becomes smaller, cheaper and more versatile. If you don’t know what RFID is, you'll soon find out!</p>
<p>RFID is a wireless identification system that can be viewed like a phone conversation. For a phone conversation to work, we need two telephones, one phone is used to dial and the other one receives the call. Imagine this is a phone call between an automated dialing system and you. In an RFID system, the phone dialing is a called a “reader” and the phone receiving is called a “tag.” The reader acts much like an automated dialer, where it can call any number of phones at once. Instead of the tag saying “hello,” as you would, it will respond with a list of numbers. The numbers are the identification of that tag, and only that tag. Now much like you will hang up once you hear its an automated system asking you for money, the reader ends the conversation with the tag.</p>
<p>In recent years, many commercial applications of RFID have been released. For example, <a href="https://www.speedpass.com">Mobil Speedpass</a> uses RFID. Have you ever rented a <a href="http://www.zipcar.com/">ZipCar</a>? The key used to unlock the car uses RFID. It is becoming standard for cars today to allow you to lock, unlock and start the car without inserting the key.</p>
<p>RFID systems have become a common replacement for keys around the workplace. The conventional lock on a door can be replace<a href="www.zipcar.com"><img class="alignright size-full wp-image-336" title="zipcar" src="http://www.msilverman.me/wp-content/uploads/2011/04/zipcar.jpg" alt="" width="250" height="375" /></a>d by an RFID system. A tag is used to authenticate the person and unlock the door. A tag does not require any power, so there are no batteries, and can be smaller than a dime. It is commonly used inside a credit card-sized piece of plastic. The size of a reader can vary from a handheld device to the size of a doorknob.</p>
<p>The beauty of using an RFID system as a key is access management and access history. The readers can be programmed to only allow certain tags, or people, into certain rooms. If an employee quits the company, his tag number can simply be removed from the system. There is never worry about losing keys or wondering who has what key. With a tag costing only cents, it is very easy to add or remove access to a room. The readers also record each person who entered the room and at what time. This is useful if there is a security breach of any kind.</p>
<p>Some RFID tags are designed to be implanted under the skin. It is very common in Europe and the USA for pets that are adopted to have a tag, called a microchip in this context, implanted in them.  The microchip is smaller than a grain of rice and can be implanted into a pet the same way a vaccine is. When scanned, the identification of the pet can be looked up in a database. The idea is that any pet can be traced back to its rightful owner if it is lost or stolen. You can read more about pets and microchips <a href="http://www.vetinfo.com/pet-microchip-identification.html">here.</a></p>
<p>Other people have had tags implanted under their own skin. Generally the location of the implant is in between the thumb and index finger. Implants in humans are not widely used. There is speculation regarding RFID causing cancer in the tissue surrounding the implant. If you really don't want to carry around money or identification, there is a <a href="http://www.guardian.co.uk/technology/2004/jun/10/onlinesupplement1">club</a> in Barcelona which will scan you instead. With some modification, you can even <a href="http://hackaday.com/2010/01/14/start-the-car-with-a-wave-of-your-hand/">start and unlock your car</a> with the same implant.</p>
<p>The future of RFID holds many great possibilities. One of these possibilities is the much needed modernization of bar codes. A bar code must be scanned individually and put directly in front of the scanner. When going to the grocery store, every item must be scanned one by one. With RFID, the food could be scanned without even having to leave the basket. Not only that, all the items could be scanned simultaneously.</p>
<p>There is also a lot of interest in putting tags into paper products, i.e. passports and checks. If you are interested in a detailed breakdown of this new technology <a href="http://en.citizendium.org/wiki/User:Michael_Silverman/Radio_Frequency_Identification">here</a> is a Citizendium article I wrote for a writing class of mine.</p>
<p>For more information:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Radio-frequency_identification">Wikipedia</a></li>
<li><a href="http://www.rsa.com/rsalabs/node.asp?id=2115">RSA Laboratories</a></li>
<li>Though very technical, <a href="http://www.securerf.com/RFID-Security-blog/">securerf</a> is a well-written blog regarding security and privacy.</li>
<li>VeriChip, now named <a href="http://www.positiveidcorp.com/">PositiveID</a>, designed the human implantable chip</li>
</ul>
<p>Want to start playing around with RFID on your own? <a href="http://blog.littlebirdelectronics.com/project-simple-rfid-access-system">Simple RFID access system</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msilverman.me/2011/04/the-answer-to-losing-your-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Put Your PC Monitor to Sleep With an iPhone</title>
		<link>http://www.msilverman.me/2010/11/put-your-monitor-to-sleep-with-an-iphone/</link>
		<comments>http://www.msilverman.me/2010/11/put-your-monitor-to-sleep-with-an-iphone/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 06:34:31 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.msilverman.me/?p=309</guid>
		<description><![CDATA[When I go to sleep at night I like it dark. I also keep my computer on 24/7. In the past when going to sleep I would hit the power switch on my monitor. Or more often than not I would leave it on. Now when I'm in bed I click an icon on my [...]]]></description>
			<content:encoded><![CDATA[<p>When I go to sleep at night I like it dark. I also keep my computer on 24/7. In the past when going to sleep I would hit the power switch on my monitor. Or more often than not I would leave it on. Now when I'm in bed I click an icon on my iPhone and the monitor turns off. You can have this up and running in 10 minutes.</p>
<p>For this to work, your phone must be wifi enabled and connected to the same network as your PC. I use an iPhone in this example but any phone able to use wifi will work.</p>
<p>Here's what you need:</p>
<ul>
<li>NirCmd: This command line utility is used to put the monitor into sleep. <a href="http://www.msilverman.me/wp-content/uploads/2010/11/nircmd.zip">Download</a> - <a href="http://www.nirsoft.net/utils/nircmd.html">Website</a></li>
<li>QuickPHP: You need to run a web server that supports PHP on your computer. Any server will work. I chose this one because it's lightweight and quick and easy to setup. <a href="http://www.msilverman.me/wp-content/uploads/2010/11/quickphp_webserver.zip">QuickPHP</a>- <a href="http://www.zachsaw.co.cc/?pg=quickphp_php_tester_debugger">Website</a></li>
<li>PHP Source Code: <a href="http://www.msilverman.me/wp-content/uploads/2010/11/index.zip">Download</a></li>
</ul>
<ol>
<li>After downloading NirCmd, unzip it and place nircmdc.exe in your system32 directory, i.e. C:\Windows\System32\. Note: Placing an executable in system32 directory is great because then you can access the files from any directory within command line, no need to find the directory first.</li>
<li>Create two new folders. One for the PHP Server and one for your web files. I will use the following directories: C:\PHPServer and C:\PHP</li>
<li>Download QuickPHP and unzip. This program will not install, you must place the program files somewhere. I moved them to C:\PHPServer for easy access.</li>
<li>Download the source code and place it in C:\PHP.</li>
<li>Go to the QuickPHP directory and run QuickPHP.exe - Change the "Root" folder to whatever you choose above as the web file directory (C:\PHP). Note the server port, default 5723.  Hit Start.</li>
<li>For the next step you need to know your local IP address. To get this go to the start menu. Type in "Run" in the search bar and hit enter or simply click the run icon. Where it says "open" type in "cmd" - You now have a command prompt open. You should see something like C:\... type in "ipconfig" - Now look for your the number labeled IPv4 address. It will likely start with 192.168 - This is the number you will use in YOU_IP in the next step.</li>
<li>Get your iPhone and open up Safari. In the address bar, type in http://YOUR_IP:5723 - i.e. http://192.168.1.2:5723</li>
<li>Click the + sign and select "Add to Home Screen"</li>
<li>Want to turn it off? Click:</li>
</ol>
<p style="text-align: center;"><a href="http://www.msilverman.me/wp-content/uploads/2010/11/iPhoneMonitor21.jpg"><img class="size-full wp-image-325  aligncenter" title="iPhoneMonitor2" src="http://www.msilverman.me/wp-content/uploads/2010/11/iPhoneMonitor21.jpg" alt="" width="88" height="82" /></a></p>
<p>There are a few ways this could be modified to better suit you: Modify the PHP code to only accept certain IP addresses. The PHP code is very simple and does not protect you from other people on your network turning your monitor off. That is why its useful to use a non-standard port and have a firewall on your network blocking outside traffic. - Alternatively, open a port on your firewall to allow outbound connections. Then use your WAN IP (www.whatismyip.com) to connect to the computer. This removes the need for the phone to be connected to wireless. - Change the filename to blah.php. It would prevent others from turning the monitor off because you then have to access http://YOU_IP:5723/blah.php<a href="http://www.msilverman.me/wp-content/uploads/2010/11/iPhoneMonitor2.jpg"></a><a href="http://www.msilverman.me/wp-content/uploads/2010/11/iPhoneMonitor.jpg"></a><a href="http://www.msilverman.me/wp-content/uploads/2010/11/iPhoneMonitor2.jpg"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.msilverman.me/2010/11/put-your-monitor-to-sleep-with-an-iphone/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Nixie Clock Update: Prototype</title>
		<link>http://www.msilverman.me/2010/09/nixie-clock-update-prototype/</link>
		<comments>http://www.msilverman.me/2010/09/nixie-clock-update-prototype/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 03:28:34 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://www.msilverman.me/?p=295</guid>
		<description><![CDATA[I wanted to give an updated on my nixie clock. I've been very busy with classes the last few months but I have had some time to work on the clock. I have created a prototype that will effectively test the majority of the circuit and all the microcontroller related functions. I'm using a 7SEG [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to give an updated on my nixie clock. I've been very busy with classes the last few months but I have had some time to work on the clock. I have created a prototype that will effectively test the majority of the circuit and all the microcontroller related functions.</p>
<p>I'm using a 7SEG display in place of the nixie tubes. This is because the nixie tubes do not fit in the protoboard easily. This substution still replicates the final design in implementation because all the displays are hooked up the same as the nixie tube. Each digit has a transistor connected to it's anode. The 74LS chip which drives the digits also has a BCD input, the same as the 74141. One of the ICs are comprised of NOT gates. I needed to flip the output of the 74LS driver to work correctly with the active low inputs of the 7SEG displays. The displays are hooked up all multiplexed and turned on individually in the same manner the nixie tubes will be.</p>
<p>You can also see the two pushbuttons which are used for setting functions. The MAX232 which is used to convert the RS-232 voltages to TTL level for the PIC. The clock OSC on the PIC is using the simple RC method as outlined in the datasheet. I wanted to get some testing done and have yet to determine which crystal/cap combo I will be using.</p>
<p>Also the programmer I am using is from a company called Cana Kit and functions the same as the PIC Kit 2. Here is the link on <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9667">SparkFun</a>, although I purchased it on eBay for cheaper. It is working great for programming and in-circuit debugging (ICD).</p>
<p>I am going to be sparse with the details but I am getting closer and closer to ordering a real prototype PCB and getting things started!</p>
<p><a href="../wp-content/uploads/2010/09/tn_DSC_0294.jpg"><img class="aligncenter size-medium wp-image-296" title="nixieProtoTop" src="../wp-content/uploads/2010/09/tn_DSC_0294-289x300.jpg" alt="" width="289" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.msilverman.me/2010/09/nixie-clock-update-prototype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo! Groups &#8211; An Outstanding Resource</title>
		<link>http://www.msilverman.me/2010/07/yahoo-groups-an-outstanding-resource/</link>
		<comments>http://www.msilverman.me/2010/07/yahoo-groups-an-outstanding-resource/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 12:00:49 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[nixie]]></category>
		<category><![CDATA[PCB]]></category>
		<category><![CDATA[PIC]]></category>
		<category><![CDATA[Yahoo! Groups]]></category>

		<guid isPermaLink="false">http://www.msilverman.me/?p=260</guid>
		<description><![CDATA[I wish I had joined Yahoo! Groups earlier. For a while I have been researching Nixie Clocks. Along the way I heard of a newsgroup mentioned a couple times, but I never gave it much thought. I've recently completed many milestones into the design of my clock. And of course, as engineering projects always seem [...]]]></description>
			<content:encoded><![CDATA[<p>I wish I had joined <a href="http://groups.yahoo.com/">Yahoo! Groups</a> earlier. For a while I have been researching Nixie Clocks. Along the way I heard of a newsgroup mentioned a couple times, but I never gave it much thought. I've recently completed many milestones into the design of my clock. And of course, as engineering projects always seem to go, there comes a point where research and implementation don't quite click in my head, and I need some specific help. I started having questions which I couldn't answer on my own and couldn't find asked elsewhere. I decided to give Yahoo Groups a try.</p>
<p>I joined the group <a title="NEONIXIE-L" href="http://groups.yahoo.com/group/NEONIXIE-L/">NEONIXIE-L.</a> At first I was a bit confused. I requested to join the group but I was not accepted. I got an e-mail from an administrator. He told me that in an effort to avoid spammers, I need to re-request to join, and I need to include a reason why I was joining the group. That was easy: "I'm an EE student building a Nixie clock playing with high voltages. I want to make sure I don't break anything/myself." That in itself was a good sign. You can't just join a million groups for no reason. When I started reading the posts I was even more impressed. I had no idea what these guys were talking about. I understand the terms they were using, but the actual logic, what? This was great! It was reminiscent of the saying, "You always want to surround yourself with people that are smarter than you." It was like reading a textbook, but directed towards the question at hand. For example, I recently asked a question related to reading serial data (tx/rx) on a PIC microcontroller. Not only was I given the abstract process, but also a code example in both C and Assembly. This is a response from member "nixiebunny" in NEONIXIE-L. I feel this is a good representation of the quality answers you will receive:</p>
<div>
<pre>Re: [NEONIXIE-L] RS232 for GPS on PIC (help!)</pre>
</div>
<pre> On 6/29/2010 8:12 PM, msilv3r wrote:
 &gt;
 &gt; Now my question to you guys, on the PIC side of things.
 &gt; -From my current understanding, I will have a byte by byte buffer.
 &gt; This means I will have to do some type of compare with each  character.
 &gt; I'm not sure how to do this.
 &gt;

 I've done serial communication with the 18F4520 in MCC18, but not with a
 16F in C. I have programmed a 16F873 in assembly language to do serial I/O.

 The serial port is simply a data register that contains the last byte
 received, and a status bit in the status register indicating that a
 data byte is  available in the data register.

 When the data register is read, then the status flag is automatically
 cleared until another byte is received. So you only have to test the status
 bit and read in the character to move data into your string array.

 Here's a rough idea of the C code:

 char the_char, string[80]; // storage for the string
 char *p; // point to where the next char goes

 p = string[0]; // point at first character's location
 while (!timeout) { // prevent hanging on missing EOL
 if (USART_status_bit) // reads the status register bit
 the_char = *p++ = USART_data_reg; // get the character
 [some timeout code]
 if (the_char == '\n') // detect end of line
 break;
 }

 Don't assume that this will compile - it's rather off-the-cuff.

 The timeout code can just increment a counter and trigger the timeout thing
 when the count hits some big value corresponding to more than a second of
 real time. Without a timeout, your code will hang forever if there's a
 communication error.

 --
 David Forbes, Tucson, AZ"</pre>
<p>Another group I joined is called <a title="Homebrew_PCBS" href="http://tech.groups.yahoo.com/group/Homebrew_PCBs/">Homebrew_PCBs</a>. Have you ever wanted to etch your own circuit board? This a great resource on how you can do that. I will be posting my success story on this process soon.</p>
<p>Here's why you should investigate Yahoo! Groups as a resource for you:</p>
<p>-Each post is moderated to keep out the spammers/nonsense.</p>
<p>-The contributing authors are often experts in the field. It seems to be an older crowd. Some are professionals in fields relating to the topic at hand.</p>
<p>-You will likely get an answer with more information than you need.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msilverman.me/2010/07/yahoo-groups-an-outstanding-resource/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Create a New Device in EAGLE</title>
		<link>http://www.msilverman.me/2010/06/creating-a-new-device-in-eagle/</link>
		<comments>http://www.msilverman.me/2010/06/creating-a-new-device-in-eagle/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 00:38:49 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[circuit]]></category>
		<category><![CDATA[EAGLE]]></category>
		<category><![CDATA[PCB]]></category>
		<category><![CDATA[PCB Layout]]></category>
		<category><![CDATA[schematic]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Z573M]]></category>

		<guid isPermaLink="false">http://www.msilverman.me/?p=167</guid>
		<description><![CDATA[As you can see in my previous post I want to build a Nixie Clock. The tubes I have are model Z573M. I plan on designing a circuit, testing it, and having the final product manufactured. I only plan on making two clocks, but I want to do it professionally. The problem is, to my [...]]]></description>
			<content:encoded><![CDATA[<p>As you can see in my previous post I want to build a Nixie Clock. The tubes I have are model Z573M. I plan on designing a circuit, testing it, and having the final product manufactured. I only plan on making two clocks, but I want to do it professionally. The problem is, to my knowledge the Z573M does not exist as a part in any circuit designing program. So even for my initial schematic I was running into issues. I decided to use <a href="http://www.cadsoftusa.com/index.htm">EAGLE</a> because I've heard it's powerful, fairly easy to use, and they have a version that is <a href="http://www.cadsoftusa.com/download.htm">freeware</a>.</p>
<p>When you are creating a new part in EAGLE you may want to create a new library. This will make it easier to share your part, should you choose to do so.</p>
<p>To create a new library in EAGLE go to File &gt; New &gt; Library.</p>
<p style="text-align: center;"><img class="size-full wp-image-172 aligncenter" title="Create a New Library" src="http://www.msilverman.me/wp-content/uploads/2010/06/newLibrary.png" alt="" width="616" height="438" /></p>
<p><span id="more-167"></span></p>
<h1 style="text-align: left;">The Symbol</h1>
<p style="text-align: left;">For each part you will create there are three components: Symbol, Package and Device. Let's start by creating the Symbol. Click the Symbol button.<img title="More..." src="../wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /><img title="More..." src="../wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<p style="text-align: center;"><img class="size-full wp-image-175 aligncenter" title="New Symbol" src="http://www.msilverman.me/wp-content/uploads/2010/06/newSymbol.png" alt="" width="232" height="106" /></p>
<p>A window titled Edit will pop up. Type in the name of your part where it says New, I will be creating a part titled Z573M. Hit OK. A warning will come up saying Create New Symbol - hit Yes.</p>
<p style="text-align: center;"><img class="size-full wp-image-176 aligncenter" title="edit Screen" src="http://www.msilverman.me/wp-content/uploads/2010/06/editScreen.png" alt="" width="294" height="350" /></p>
<p>You are now at the screen where you will create the Symbol. You want to center the design around the + in the center. In the future, when you move your device, this will be the center position of it. Here are the essential tools and their functions used for creating a Symbol. For each tool that you use, you want to hit the STOP button on the top toolbar when you are finished. That will let the program know you are done with the tool.</p>
<p><img class="alignnone size-full wp-image-185" title="toolGrid" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolGrid.png" alt="" width="34" height="32" /> Grid - If the normal grid spacing does not suffice for your design use this tool to modify it. Default spacing is 0.1 inches apart.</p>
<p><img class="alignnone size-full wp-image-182" title="toolWire" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolWire.png" alt="" width="33" height="32" /> Wire - This tool can be used to create the outline of your Symbol.</p>
<p><img class="alignnone size-full wp-image-179" title="toolDelete" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolDelete.png" alt="" width="33" height="32" /> Delete - To remove a part in EAGLE you must first select the Delete tool and then click on the item you want removed.</p>
<p><img class="alignnone size-full wp-image-181" title="toolSelect" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolSelect.png" alt="" width="33" height="32" /> Move - To move a part you must first select the Move tool and then click on the area you wish to move.</p>
<p><img class="alignnone size-full wp-image-180" title="toolPins" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolPins.png" alt="" width="33" height="32" /> Pins - This is to designate all of the input and output pins on your chip. Remember, this is only the symbol so you don't need to designate all the pins on the physical device. We will do this later in the Package section. If you know you will only be using five of the pins in your circuit, it is ok to only have five pins showing in your symbol.</p>
<p>I start my design by creating the outline with the Wire tool. By looking at my <a title="datasheet" href="http://www.msilverman.me/wp-content/uploads/2010/06/Z573M.pdf" target="_blank">datasheet</a> I determine which pins I want to be displayed in this symbol. In this case there are 11 outputs and 1 input.</p>
<p>I then move on to creating the pins. I click on the Pin tool. You will notice on the top that new toolbar appears showing you advanced options for the Pin tool.</p>
<p style="text-align: center;"><img class="size-full wp-image-186 aligncenter" title="pinAdvanced" src="http://www.msilverman.me/wp-content/uploads/2010/06/pinAdvanced1.png" alt="" width="700" height="35" /></p>
<p>For the first 11 pins I will change the Direction to Out.</p>
<p>For the last pin I will change the Direction to In. I will also change the orientation of the pin by using the third button on the left hand side.</p>
<p>At this point in time you will have a design similar to this.</p>
<p style="text-align: center;"><img class="size-full wp-image-191 aligncenter" title="symbol1" src="http://www.msilverman.me/wp-content/uploads/2010/06/symbol1.png" alt="" width="349" height="325" /></p>
<p>Next let's use the Name <img class="alignnone size-full wp-image-192" title="toolName" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolName.png" alt="" width="33" height="32" /> tool and rename all of the pins. For example, I renamed pin P$1 to K0. This will help you in the future when we link the Symbol and Package.</p>
<p>The last thing left to do in the Symbol is to name it. Click the text tool and type in "&gt;NAME" This is useful for when you have the same device multiple times in the circuit. This placement tag will show up as "U$1, U$2....U$n."</p>
<p>Now let's type in the device name. This we want to do on a different layer. Click on the Wire tool.</p>
<p>In the top toolbar click on <img class="alignnone size-full wp-image-206" title="layerSelect" src="http://www.msilverman.me/wp-content/uploads/2010/06/layerSelect1.png" alt="" width="116" height="26" /> and change it to <img class="alignnone size-full wp-image-207" title="layerSelect2" src="http://www.msilverman.me/wp-content/uploads/2010/06/layerSelect21.png" alt="" width="116" height="25" />.</p>
<p>Now click on the Text tool and type in your device name and move it where you'd like. Before you go any further, save your library. To do so, click File &gt; Save.</p>
<p style="text-align: center;">&nbsp;</p>
<p><a href="http://www.msilverman.me/wp-content/uploads/2010/06/symbolFinal-e1277403131560.png"><img class="aligncenter size-full wp-image-203" title="symbolFinal" src="http://www.msilverman.me/wp-content/uploads/2010/06/symbolFinal-e1277403131560.png" alt="" width="370" height="323" /></a></p>
<h1><strong>The Package</strong></h1>
<p>Now that we have a Symbol created we want to create the Package. The Package will define the physical component of your schematic. It's how it will look on a circuit board.</p>
<p>Click on the Package icon.</p>
<p style="text-align: center;"><img class="aligncenter" title="newPackage" src="http://www.msilverman.me/wp-content/uploads/2010/06/newPackage.png" alt="" width="232" height="106" /></p>
<p>Once again you will be at the Edit screen. Name this the same as your Symbol. As with my Symbol, I will name this Z573M. Hit OK and then Yes when the warning comes up.</p>
<p>This process is very similar to designing your symbols. You want to take the info from your datasheet and redesign it. If you don't have a datasheet, manually taking measurements will work. When designing, you always want to keep in mind, this is how your device will look on a circuit board. When using these tools you definitely want to pay attention to the layer you are modifying.</p>
<p><a href="http://www.msilverman.me/wp-content/uploads/2010/06/toolSMD1.png"><img title="toolSMD" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolSMD1.png" alt="" width="34" height="32" /></a>SMD - This will create the pads for your surface mount components. You want to pay attention to the layer you are on. For the freeware version, you can only have two layers, Top and Bottom.</p>
<p><img title="toolPad" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolPad.png" alt="" width="34" height="32" />Pad - Use this tool to create all the through hole pads on your board. This is the one tool where you do not need to pay attention to the layer.</p>
<p><a href="http://www.msilverman.me/wp-content/uploads/2010/06/toolWire.png"><img title="toolWire" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolWire.png" alt="" width="33" height="32" /></a>Wire - This time we will use this tool for actual wires. Remember to pay attention to make sure you're on the Top (Red) or Bottom (Blue) layer.</p>
<p><img class="size-full wp-image-243 alignnone" title="toolCircle" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolCircle.png" alt="" width="33" height="32" />Circle - There is a good chance you will not use this tool. However I will in my example so it's worth noting. I used it to create an outline of the device.</p>
<p>This is how I created my Z573M.</p>
<p>1. Change the grid size to 0.001 and the units to mm.</p>
<p>2. I know the device has a diameter of 9.53mm. Click on the Circle tool and make sure you are working on layer "21 tPlace." In this situation it's easier to use the command window on top and type in the coordinates for the circle.Type in the origin (0 0) and the outer edge (0 4.765). Now there is an outline to work with. Creating an outline may also make assembly more efficient for certain devices like a transistor.</p>
<p>3. There are 13 pins. I measured the space between the large gap in the back of the tube. I then placed the 13 pins in a circle as evenly as possible. Remember that you will be soldering between these pads so make sure they are spaced out enough that they won't touch!</p>
<p>4. Now using the Name tool rename each Pad. I use the same name as the datasheet, which is the same name as the corresponding pin on the Symbol.</p>
<p>5. Click the wire tool, select layer "25 tNames" and name your device.</p>
<p>6. Click the wire tool, select layer "49 Reference" and type in "&gt;NAME"  once again.</p>
<p style="text-align: center;"><a href="http://www.msilverman.me/wp-content/uploads/2010/06/packageFinal.png"><img class="aligncenter" title="packageFinal" src="http://www.msilverman.me/wp-content/uploads/2010/06/packageFinal.png" alt="" width="294" height="241" /></a></p>
<p>The Package is complete! Time to link the package with the Symbol.</p>
<h1>The Device</h1>
<p>Click on the Device icon.</p>
<p><a href="http://www.msilverman.me/wp-content/uploads/2010/06/newDevice.png"><img class="aligncenter size-full wp-image-237" title="newDevice" src="http://www.msilverman.me/wp-content/uploads/2010/06/newDevice.png" alt="" width="232" height="106" /></a></p>
<p>Once again you will be at the Edit screen. Name this the same as your previous components. I will name this Z573M. Hit OK and then Yes when the warning comes up.</p>
<p>1. Select the Add <img class="size-full wp-image-239 alignnone" title="toolAdd" src="http://www.msilverman.me/wp-content/uploads/2010/06/toolAdd.png" alt="" width="34" height="32" /> button on the left and select your Symbol name.</p>
<p>2. Click New in the bottom right hand corner. Then click on the device name that you have been using.</p>
<p>3. Click Connect. You will see three columns. If you remember we renamed all of our Pads and all of our Pins. That was for this part. If you named them previously this part is pretty self explanatory. Click on the Pad and the Pin equivalent and hit Connect. Do this for all the Pin and Pad combos you have.</p>
<p>4. You are all finished! Now just load up the library when you are working on your schematic and add the device like you would any other.</p>
<p>Extra things you can do: Add in a description for each component. Modify the Symbol to look cleaner or more compact.</p>
<p style="text-align: center;"><a href="http://www.msilverman.me/wp-content/uploads/2010/06/deviceFinal.png" target="_blank"><img class="aligncenter size-medium wp-image-241" title="deviceFinal" src="http://www.msilverman.me/wp-content/uploads/2010/06/deviceFinal-300x236.png" alt="" width="300" height="236" /></a></p>
<p>You can download a copy of my demoLib Library file here: <a href="http://www.msilverman.me/wp-content/uploads/2010/06/demoLib.lbr">demoLib.lbr</a></p>
<p>UPDATE: Have you made a board and want to have a prototype created? Check out this great tutorial <a href="http://colinkarpfinger.com/blog/2010/ordering-pcbs-designed-with-eagle/">Ordering PCBs designed with eagle.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.msilverman.me/2010/06/creating-a-new-device-in-eagle/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

