<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="https://brooke.codes/wp-content/plugins/pretty-rss-feeds/xslt/pretty-feed.xsl" type="text/xsl" media="screen" ?><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>&lt;Brooke&gt; &lt;Codes&gt;</title>
	<atom:link href="https://brooke.codes/feed/" rel="self" type="application/rss+xml" />
	<link>https://brooke.codes</link>
	<description>The Tech Blog of Brooke. </description>
	<lastBuildDate>Tue, 09 Dec 2025 09:01:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Delete All Twitter (X) Content</title>
		<link>https://brooke.codes/2025/12/07/delete-all-twitter-x-content/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Sun, 07 Dec 2025 19:55:00 +0000</pubDate>
				<category><![CDATA[Random]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=1781</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2025/12/delete_twitter-150x150-png.avif" class="attachment-thumbnail size-thumbnail not-transparent wp-post-image" alt="Delete twitter" decoding="async" data-has-transparency="false" data-dominant-color="131313" style="--dominant-color: #131313;" />This weekend, I decided to finally take the plunge and delete all content in my Twitter account. While deleting the account itself would have been a simpler solution, I have had issues in the past where my former username was used to impersonate me and spam others. The first search results are for Twitter apps [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2025/12/delete_twitter-150x150-png.avif" class="attachment-thumbnail size-thumbnail not-transparent wp-post-image" alt="Delete twitter" decoding="async" data-has-transparency="false" data-dominant-color="131313" style="--dominant-color: #131313;" />
<p class="wp-block-paragraph">This weekend, I decided to finally take the plunge and delete all content in my Twitter account. While deleting the account itself would have been a simpler solution, I have had issues in the past where my former username was used to impersonate me and spam others.</p>



<p class="wp-block-paragraph">The first search results are for Twitter apps with&#8230; questionable&#8230; marketing practices. The apps claim to delete up to 500 tweets for free, but don&#8217;t actually offer those plans. This is likely in part due to X&#8217;s API changes, but nonetheless, I wanted to post about a free way to delete all tweets and remove followers.</p>



<h2 class="wp-block-heading">Safety First: Request Archive</h2>



<p class="wp-block-paragraph">The first step is to <a target="_blank" href="https://help.x.com/en/managing-your-account/how-to-download-your-x-archive" rel="noreferrer noopener">request an archive</a> if there is anything you want to save. Note that it may take a couple of days to prepare your backup. So do this first.</p>



<h2 class="wp-block-heading">Prepare your console.</h2>



<p class="wp-block-paragraph">For safety, pasting into the browser console is disabled by default in most major browsers like Firefox and Chrome; you may need to type allow pasting to paste JavaScript into the console. This is your reminder to be careful with pasting scripts in general!</p>



<h2 class="wp-block-heading">Delete All Tweets</h2>



<p class="wp-block-paragraph"><a target="_blank" href="https://chrissmith.xyz/blog/2024/bulk-deleting-tweets/" rel="noreferrer noopener">Chris Smith&#8217;s method of deleting all tweets </a>worked well for me. I had to run it a few times since I had a few thousand tweets. To run the script, you visit /profile while logged in and then run the script in the console.</p>



<h2 class="wp-block-heading">Remove all Following</h2>



<p class="wp-block-paragraph"><a target="_blank" href="https://gist.github.com/JamieMason/7580315" rel="noreferrer noopener">The unfollow script</a> worked well, but had a really low rate limit. I had to run the script lots of times, about every 100 followers or so. However, you visit /profile/following/ and run the script.</p>



<h2 class="wp-block-heading">Remove all Followers</h2>



<p class="wp-block-paragraph">Before I wanted to delete my account, I didn&#8217;t even know it was possible to remove followers. This may be a newer feature since I left the site. It should be noted that this doesn&#8217;t prevent folks from re-following, but it does help with emptying out an account. If you wanted to prevent refollow, you could block instead of unfollow. To accomplish the unfollow, <a target="_blank" href="https://gist.github.com/BrookeDot/06f80acaf65ca57620ac512306ec1360" rel="noreferrer noopener">I vibe-coded this script</a>. I&#8217;m sure it could be improved, but it did what I needed it to. Like the remove following script, I did run into rate limits.</p>



<h2 class="wp-block-heading">In Conclusion</h2>



<p class="wp-block-paragraph">I hope this helps others looking to reduce their Twitter/X footprint.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Quick Tip: Stop Forum Spam</title>
		<link>https://brooke.codes/2025/12/02/quick-tip-stop-forum-spam/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Tue, 02 Dec 2025 21:38:00 +0000</pubDate>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=1769</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2025/12/sfs-150x150-png.avif" class="attachment-thumbnail size-thumbnail not-transparent wp-post-image" alt="Sfs" decoding="async" data-has-transparency="false" data-dominant-color="dedee4" style="--dominant-color: #dedee4;" />Akismet is a great tool for fighting spam, however due to licensing and call limits I was looking to decrease the number of calls to Akismet. In my search for alternatives I stumbled upon Stop Forum Spam. For a free project, I have been impressed with their accuracy. While primary focused on, well forums, they [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2025/12/sfs-150x150-png.avif" class="attachment-thumbnail size-thumbnail not-transparent wp-post-image" alt="Sfs" decoding="async" loading="lazy" data-has-transparency="false" data-dominant-color="dedee4" style="--dominant-color: #dedee4;" />
<p class="wp-block-paragraph"><a href="https://akismet.com/">Akismet</a> is a great tool for fighting spam, however due to licensing and call limits I was looking to decrease the number of calls to Akismet. In my search for alternatives I stumbled upon <a href="https://www.stopforumspam.com/">Stop Forum Spam</a>. For a free project, I have been impressed with their accuracy. While primary focused on, well forums, they have an API. </p>



<p class="wp-block-paragraph">Other alternatives exist but for now I have been happy with the combination of Aksimet and Stop Form Spam combined with judicial word and IP blocks when needed. </p>



<span id="more-1769"></span>



<h2 class="wp-block-heading">Spam Strategy </h2>



<p class="wp-block-paragraph">While my exact spam strategy is somewhat depending on the content type. I often use a PHP library for Akismet  in combination with a word block and/or IP block list.</p>



<p class="wp-block-paragraph">For my most recent project the strategy looked like this:</p>



<ul class="wp-block-list">
<li>First check the input against an IP list. While IP blocks are a cat and mouse game, I use it to block known spammers. I&#8217;m talking about IPs that have made more than five known spam attempts in the last fourteen days get blocked for two weeks.</li>



<li>Next, check the content against a known word block list. Again this is the low hanging fruit for the crypto and link spammers who often uses the same words or phrases in their spam. </li>



<li>Once content passes both of those, the data is checked against the Stop Forum Spam database.</li>



<li>Finally, if that passes, then check the content with Akismet.</li>
</ul>



<p class="wp-block-paragraph">I found this catches about 98% of spam. All entries require manual approval, but catching spam means less moderation. </p>



<h2 class="wp-block-heading">PHP Example code</h2>



<p class="wp-block-paragraph">Here is an example using the <a href="https://www.stopforumspam.com/usage">Stop Forum Spam API</a> with <a href="https://symfony.com/doc/current/http_client.html">Symfony HTTP Client</a>. A similar method should be possible with any Request package.  For Akismet I&#8217;m using the <a href="https://github.com/omines/akismet">Omines Akismet Package</a> as I can use the same Request package.</p>



<p class="wp-block-paragraph">One quirk of the API is that the blocklists sets the <code>frequency</code> field to 255, and the <code>lastseen</code> date to the current time (UTC). I am being somewhat conservative here and checking if the <code>lastseen</code> is within the last hour.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: php; title: ; notranslate">
/**
     * Check IP / email / username against Stop ForumSpam database
     *
     * @param string | null $ip IP address to check
     * @param string | null $email Email to check
     * @param string | null $username Username to check
     * @param int $threshold Confidence threshold(0 - 100, default: 75)
     * @param bool $checkTor include TOR exit nodes in spam detection(default: false)
     * @param bool $checkBlacklist include blacklisted entries(default: true)
     * @return bool | string false if clean, or string with reason if spam detected(&#039;confidence&#039; | &#039;tor&#039; | &#039;blacklist&#039;) {
     */
    private static function stopForumSpamLookup($ip = null, $email = null, $username = null, $threshold = 75, $checkTor = true, $checkBlacklist = true)
    {
        $client = HttpClient::create();

        $params = &#x5B;&#039;json&#039; =&gt; &#039;1&#039;, &#039;confidence&#039; =&gt; &#039;1&#039;];

        if ($checkTor) {
            $params&#x5B;&#039;badtorexit&#039;] = &#039;1&#039;;
        }
        if ($checkBlacklist) {
            $params&#x5B;&#039;nobaduser&#039;] = &#039;0&#039;;
        }

        if ($ip) {
            $params&#x5B;&#039;ip&#039;] = $ip;
        }
        if ($email) {
            $params&#x5B;&#039;email&#039;] = $email;
        }
        if ($username) {
            $params&#x5B;&#039;username&#039;] = $username;
        }

        try {
            $response = $client-&gt;request(&#039;GET&#039;, &#039;http://api.stopforumspam.org/api&#039;, &#x5B;
                &#039;query&#039; =&gt; $params
            ]);

            $data = json_decode($response-&gt;getContent(), true);

            if (!isset($data&#x5B;&#039;success&#039;]) || $data&#x5B;&#039;success&#039;] != 1) {
                return false;
            }

            foreach (&#x5B;&#039;ip&#039;, &#039;email&#039;, &#039;username&#039;] as $field) {
                if (isset($data&#x5B;$field]) &amp;&amp; $data&#x5B;$field]&#x5B;&#039;appears&#039;] == 1) {
                    if ($checkBlacklist &amp;&amp; isset($data&#x5B;$field]&#x5B;&#039;frequency&#039;]) &amp;&amp; $data&#x5B;$field]&#x5B;&#039;frequency&#039;] == 255 &amp;&amp; isset($data&#x5B;$field]&#x5B;&#039;lastseen&#039;])) {
                        $lastSeen = strtotime($data&#x5B;$field]&#x5B;&#039;lastseen&#039;]);
                        $hourAgo = time() - 3600;
                        if ($lastSeen &gt;= $hourAgo) {
                            return &#039;sfs_blacklist&#039;;
                        }
                    }

                    if ($checkTor &amp;&amp; $field === &#039;ip&#039; &amp;&amp; isset($data&#x5B;$field]&#x5B;&#039;torexit&#039;]) &amp;&amp; $data&#x5B;$field]&#x5B;&#039;torexit&#039;] == 1) {
                        return &#039;sfs_tor&#039;;
                    }

                    if (isset($data&#x5B;$field]&#x5B;&#039;confidence&#039;]) &amp;&amp; $data&#x5B;$field]&#x5B;&#039;confidence&#039;] &gt;= $threshold) {
                        return &#039;sfs_confidence&#039;;
                    }
                }
            }

            return false;
        } catch (Exception $e) {
            return false;
        }
    }
</pre></div>


<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Some Reflection</title>
		<link>https://brooke.codes/2025/03/28/some-reflection/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Sat, 29 Mar 2025 06:08:18 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=1695</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2025/03/IMG_20220302_175927-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="IMG 20220302" decoding="async" loading="lazy" />I spent some time this week moving this site from WordPress.com to a self-hosted WordPress instance. As part of that process I ended up reviewing this blog which has content going back from 2011. The older content is a lot of code snippets, and plugin releases which has me thinking about how the internet has [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2025/03/IMG_20220302_175927-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="IMG 20220302" decoding="async" loading="lazy" />
<p class="wp-block-paragraph">I spent some time this week moving this site from WordPress.com to a self-hosted WordPress instance. As part of that process I ended up reviewing this blog which has content going back from 2011. </p>



<p class="wp-block-paragraph">The older content is a lot of code snippets, and plugin releases which has me thinking about how the internet has changed so much over the past 15ish years. We have moved to systems like GitHub and Reddit and that long form blogging is mostly a thing of the past. I understand the appeal of having all the content in one place, but it brings back the age old question of who owns and controls our data. </p>



<p class="wp-block-paragraph">For me, I remain a fan of open technologies (like git itself) and plan to bring back this blog. In fact, the process revealed I have lots of posts in draft form here, so more to come, stay tuned!</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Introducing Soapberry for Ackee</title>
		<link>https://brooke.codes/2019/12/29/introducing-ackee-wp/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Sun, 29 Dec 2019 23:18:40 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp-plugins]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=1081</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2020/01/banner-1544x500-1-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Banner 1544x500" decoding="async" loading="lazy" />Update: this plugin was originally called Ackee WP but has been renamed to Soapberry to comply with the WordPress.org trademark policy for plugins. The plugin can now be found on WordPress.org under the slug Soapberry. As part of my desire to own my data, I haven&#8217;t used Google Analytics for the past few years. In [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2020/01/banner-1544x500-1-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Banner 1544x500" decoding="async" loading="lazy" />
<blockquote class="wp-block-quote is-style-info-notice is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Note: </strong>This post refers to code and a project from <em>many</em> years ago <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f631.png" alt="😱" class="wp-smiley" style="height: 1em; max-height: 1em;" />. The content was edited in March of 2025 to remove dead links, improve clarity, or fix formatting, but no other edits were made. Enjoy this time capsule into the past.</p>
</blockquote>



<blockquote class="wp-block-quote is-style-warning-notice is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Update:</strong> this plugin was originally called Ackee WP but has been renamed to Soapberry to comply with the WordPress.org trademark policy for plugins. The plugin can now be found on WordPress.org under the slug <a href="https://wordpress.org/plugins/soapberry/">Soapberry</a>. </p>
</blockquote>



<p class="wp-block-paragraph">As part of my desire to own my data, I haven&#8217;t used Google Analytics for the past few years. In that time I&#8217;ve been curious about my site statistics but knew when I resumed collecting data I wanted to do so in a way that respected the privacy of my visitors.  </p>



<p class="wp-block-paragraph">This year I started a search for self-hosted tracking solutions and came across a lightweight node application, <a href="https://ackee.electerious.com">Ackee</a>. After looking at a few other options I decided on Ackee for its care in anonymizing user data. Through hashing the user&#8217;s IP, a unique domain ID, and a salt which changes daily, site visits can be tracked without tracking the individual visitors.  </p>



<p class="wp-block-paragraph">For my needs, I want to know how many visits my sites are getting, where visitors are coming from, and how long they stay on the site. However, I do not have a need or desire to track individual visitors.</p>



<h3 class="wp-block-heading">Using Ackee with WordPress</h3>



<p class="wp-block-paragraph">After setting up an Ackee instance and adding the tracking script to a few static sites I wanted to bring the functionality to my WordPress sites. At first, I just edited the theme&#8217;s <code>footer.php</code> file which worked well enough as a quick way to insert the script. Next, I hooked into <code>wp_footer()</code> so it would be easier to exclude logged in visits from the analytics. </p>



<p class="wp-block-paragraph">While both of these methods work they do require a bit of WordPress know-how and do not carry over when switching themes. Wanting a better solution, I got to work writing <a href="https://brooke.codes/past-projects/soapberry/" data-type="page" data-id="1074">Soapberry</a> a WordPress plugin that adds the Ackee tracking script and data attributes to the site&#8217;s footer based on settings saved on a WP Admin page.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="2475" height="1298" src="https://brooke.codes/wp-content/uploads/2020/01/screenshot-1.png?w=1024" alt="" class="wp-image-1103" srcset="https://brooke.codes/wp-content/uploads/2020/01/screenshot-1.png 2475w, https://brooke.codes/wp-content/uploads/2020/01/screenshot-1-300x157.png 300w, https://brooke.codes/wp-content/uploads/2020/01/screenshot-1-1024x537.png 1024w, https://brooke.codes/wp-content/uploads/2020/01/screenshot-1-768x403.png 768w, https://brooke.codes/wp-content/uploads/2020/01/screenshot-1-1536x806.png 1536w, https://brooke.codes/wp-content/uploads/2020/01/screenshot-1-2048x1074.png 2048w" sizes="auto, (max-width: 2475px) 100vw, 2475px" /></figure>



<p class="wp-block-paragraph">Keeping things simple at first, this first version of the plugin only has the ability to exclude all logged-in visitors and does not take into account the <a href="https://github.com/electerious/Ackee/blob/master/docs/Anonymization.md#personal-data">personal data options provided by Ackee</a>. In the future, you may be able to exclude visits by role and enable opt-in tracking for personal information.</p>



<h3 class="wp-block-heading">Exploring Ackee Alternatives</h3>



<p class="wp-block-paragraph">If after looking at Ackee you don&#8217;t think its right for you that&#8217;s okay. Ackee won&#8217;t be right for everyone. The good news is there are other options when looking to move away from Google Analytics, Facebook Pixel, or other third-party tools. </p>



<p class="wp-block-paragraph">Chris Wiegman <a href="https://chriswiegman.com/2019/11/setting-up-private-website-analytics-with-goaccess/">wrote a post on anonymizing and tracking visits at the server level</a> to avoid the JavaScript requirement of many trackers. The folks over at Awesome Open Source also<a href="https://github.com/awesome-selfhosted/awesome-selfhosted#analytics"> list several other Analytics tools</a> that can be explored. If you find a tool you like let me know what you are using in the comments.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WordCamp Seattle 2017 Slides</title>
		<link>https://brooke.codes/2017/11/05/wordcamp-seattle-2017-slides/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Sun, 05 Nov 2017 18:55:42 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[seattle]]></category>
		<category><![CDATA[wordcamp]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=1006</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2017/11/wcsea_featured-150x150.png" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Wcsea featured" decoding="async" loading="lazy" />This weekend I have the pleasure of speaking at WordCamp Seattle offering some advice from all parts of support. Here are the slides from my #wcsea talk, Help Us Help You, things you should know before contacting support. Once the video is on WordPress.tv that will be posted here as well.]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2017/11/wcsea_featured-150x150.png" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Wcsea featured" decoding="async" loading="lazy" />
<p class="wp-block-paragraph">This weekend I have the pleasure of speaking at WordCamp Seattle offering some advice from all parts of support. Here are the slides from my #wcsea talk, Help Us Help You, things you should know before contacting support. Once the video is on <a href="https://WordPress.tv">WordPress.tv </a>that will be posted here as well.</p>



<figure class="wp-block-embed is-type-rich is-provider-cloudup wp-block-embed-cloudup wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Brooke dukes wcsea" class="cloudup_iframe_embed" src="https://cloudup.com/iFlF1Dnf-0l?chromeless=true&amp;autoplay=false" data-uid="iFlF1Dnf-0l" data-aspect-ratio="1.36986301369863" width="500" height="365" scrolling="no" frameborder="0" mozallowfullscreen="true" webkitallowfullscreen="true" allowfullscreen="true"></iframe>
</div></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Light up the sky</title>
		<link>https://brooke.codes/2017/07/02/light-up-the-sky/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Mon, 03 Jul 2017 03:12:36 +0000</pubDate>
				<category><![CDATA[maker]]></category>
		<category><![CDATA[led-remote]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=740</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2017/07/led_featured-150x150.png" class="attachment-thumbnail size-thumbnail wp-post-image" alt="LED featured" decoding="async" loading="lazy" />I recently added a WRGB LED strip to the top of my bookshelf using WS2811 LEDs or as my friends at Adafruit call them NeoPixels. I chose RGBW LEDs&#160;so I could get a nicer white and use less power than a traditional RGB strip. Parts List: Required: Optional: Setting up the Hardware The first step [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2017/07/led_featured-150x150.png" class="attachment-thumbnail size-thumbnail wp-post-image" alt="LED featured" decoding="async" loading="lazy" />
<blockquote class="wp-block-quote is-style-info-notice is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Note: </strong>This post refers to code and a project from <em>many</em> years ago 😱. The content was edited in March of 2025 to remove dead links, improve clarity, or fix formatting, but no other edits were made. Enjoy this time capsule into the past.</p>
</blockquote>



<p class="wp-block-paragraph">I recently added a WRGB LED strip to the top of my bookshelf using WS2811 LEDs or as my friends at Adafruit call them NeoPixels. I chose RGBW LEDs&nbsp;so I could get a nicer white and use less power than a traditional RGB strip.</p>



<figure class="wp-block-video"><video height="1080" style="aspect-ratio: 1920 / 1080;" width="1920" controls src="https://brooke.codes/wp-content/uploads/2017/07/mov_20170702_17202481.mp4"></video></figure>



<span id="more-740"></span>



<h2 class="wp-block-heading"><strong>Parts List:</strong></h2>



<p class="wp-block-paragraph"><strong>Required:</strong></p>



<ul class="wp-block-list">
<li>NeoPixel Strip ( https://www.adafruit.com/product/2837 &nbsp;)</li>



<li>Particle Photon ( https://www.particle.io/products/hardware/photon-wifi-dev-kit&nbsp;)</li>



<li>AC/DC Power converter with 5V output. Lots of options here, make sure it&#8217;s powerful enough for your strips&#8217; length. I used&nbsp;https://www.amazon.com/gp/product/B01B1QKLR8/ )</li>



<li>470Ω Resistor</li>



<li>1000µF (6.3V or higher) capacitor</li>



<li>Wires.</li>



<li>Breadboard or blank circuit board</li>
</ul>



<p class="wp-block-paragraph"><strong>Optional:</strong></p>



<ul class="wp-block-list">
<li>Seeed Particle Photon Base Shield ( https://www.seeedstudio.com/Particle-Photon-Base-Shield-p-2598.html&nbsp;)</li>



<li><a href="https://www.seeedstudio.com/Grove-Universal-4-Pin-Buckled-5cm-Cable-5-PCs-Pack.html">Grove Connectors</a></li>
</ul>



<h2 class="wp-block-heading">Setting up the Hardware</h2>



<p class="wp-block-paragraph">The first step will be to wire up the power and data pin to the LED strip. You can use a traditional breadboard or for a more&nbsp;<span class="me">permanent&nbsp;</span>solution solder directly to a blank circuit board. I&#8217;m using a Grove Photon shield and Grove connector. I find this gives me the clean connections I&#8217;m looking for without requiring direct soldering onto the Photon.</p>



<p class="wp-block-paragraph"><span style="line-height:inherit;">Adafruit has put together a <a href="https://learn.adafruit.com/adafruit-neopixel-uberguide">great guide on NeoPixels</a> so I won&#8217;t be going into too much detail here. While the whole guide is great I particularly recommend the part on <a href="https://learn.adafruit.com/adafruit-neopixel-uberguide/powering-neopixels">Powering NeoPixels</a> which will help you determine how large a power supply you need and other safety concerns.&nbsp;</span></p>



<p class="wp-block-paragraph">I used D2 but any available data pin will work. Going to the strip the&nbsp;capacitor will be placed between the Ground and VCC ( + ). This makes sure that the strip doesn&#8217;t get too much power.</p>



<p class="wp-block-paragraph">The resistor is placed between the D2 pin and the strip. Like the capacitor this prevents the board from getting too much power and overloading.</p>



<p class="wp-block-paragraph">One important note is to make sure you are sharing the common ground between the Photon and the LED strip if you forget this step the strip won&#8217;t be able to be controlled by your board.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1223" height="600" src="https://brooke.codes/wp-content/uploads/2017/07/photon_led_bb1.png" alt="photon_LED_bb.png" class="wp-image-844" srcset="https://brooke.codes/wp-content/uploads/2017/07/photon_led_bb1.png 1223w, https://brooke.codes/wp-content/uploads/2017/07/photon_led_bb1-300x147.png 300w, https://brooke.codes/wp-content/uploads/2017/07/photon_led_bb1-1024x502.png 1024w, https://brooke.codes/wp-content/uploads/2017/07/photon_led_bb1-768x377.png 768w" sizes="auto, (max-width: 1223px) 100vw, 1223px" /></figure>



<p class="wp-block-paragraph">Here&#8217;s what my final board looks like. With the Grove connector between the ground and data connections.</p>



<figure class="wp-block-image"><img decoding="async" src="https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1713562.jpg" alt="IMG_20170702_1713562" class="wp-image-783"/></figure>



<p class="wp-block-paragraph">Here&#8217;s an image of the Photon. My particular device had its USB port snapped off (oops) so I used a Photon Power Shield to add back in the USB power. This also gives me the option of powering the device directly from my DC Power supply if I wish.</p>



<figure class="wp-block-image"><img decoding="async" src="https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1716400-e1499046503781.jpg" alt="Photon" class="wp-image-786"/></figure>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">I also went ahead and added a connector to the end of the LED strip and shink wrapped the connections. This makes for a nice clean setup.</p>



<figure class="wp-block-gallery has-nested-images columns-3 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="581" data-id="784" src="https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715564-e1499052561784-1024x581.jpg" alt="" class="wp-image-784" srcset="https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715564-e1499052561784-1024x581.jpg 1024w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715564-e1499052561784-300x170.jpg 300w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715564-e1499052561784-768x435.jpg 768w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715564-e1499052561784-1536x871.jpg 1536w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715564-e1499052561784-2048x1161.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="884" data-id="782" src="https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1714449-e1499052530452-1024x884.jpg" alt="" class="wp-image-782" srcset="https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1714449-e1499052530452-1024x884.jpg 1024w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1714449-e1499052530452-300x259.jpg 300w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1714449-e1499052530452-768x663.jpg 768w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1714449-e1499052530452-1536x1326.jpg 1536w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1714449-e1499052530452-2048x1768.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="392" data-id="781" src="https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715475-e1499052474437-1024x392.jpg" alt="" class="wp-image-781" srcset="https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715475-e1499052474437-1024x392.jpg 1024w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715475-e1499052474437-300x115.jpg 300w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715475-e1499052474437-768x294.jpg 768w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715475-e1499052474437-1536x589.jpg 1536w, https://brooke.codes/wp-content/uploads/2017/07/img_20170702_1715475-e1499052474437-2048x785.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</figure>



<h2 class="wp-block-heading">Setting up the Firmware</h2>



<p class="wp-block-paragraph">I am using the <a href="https://github.com/adafruit/Adafruit_NeoPixel">NeoPixel Library</a> by Adafruit and the <a href="https://docs.particle.io/reference/firmware/photon/#cloud-functions">Particle Cloud API</a> to send and receive data  to/from the strip. You&#8217;ll find the <a href="https://gist.github.com/BrookeDot/d6cdec852b2a4575d6bddccc9c3de401" data-type="link" data-id="https://gist.github.com/BrookeDot/d6cdec852b2a4575d6bddccc9c3de401">full code on GitHub</a>.  You&#8217;ll want to flash this onto the Photon. Feel free to customize the firmware to meet your needs. The main things you may want to change are the defines at the top:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: csharp; title: ; notranslate">
// Input pin for LED Strip
#define PIXEL_PIN 2

//Total number of pixels
#define PIXEL_COUNT 58

// Your Pixel Type (in my case RGBW)
#define PIXEL_TYPE SK6812RGBW
</pre></div>


<h2 class="wp-block-heading">Web Interface</h2>



<p class="wp-block-paragraph">I wrote a custom web interface called MissionControl that I may write more on later which controls several IoT Devices in my home including the LED Strip. Here I&#8217;ll go over some of the basics as they pertain to the LED strip itself.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="862" height="488" src="https://brooke.codes/wp-content/uploads/2017/05/screen-shot-2017-05-28-at-1-38-47-pm.png" alt="Screen Shot 2017-05-28 at 1.38.47 PM" class="wp-image-779" srcset="https://brooke.codes/wp-content/uploads/2017/05/screen-shot-2017-05-28-at-1-38-47-pm.png 862w, https://brooke.codes/wp-content/uploads/2017/05/screen-shot-2017-05-28-at-1-38-47-pm-300x170.png 300w, https://brooke.codes/wp-content/uploads/2017/05/screen-shot-2017-05-28-at-1-38-47-pm-768x435.png 768w" sizes="auto, (max-width: 862px) 100vw, 862px" /></figure>



<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading">Cloud Variables and Functions</h3>



<p class="wp-block-paragraph">I&#8217;m using two <a href="https://docs.particle.io/reference/firmware/photon/#particle-function">particle.functions</a> ( <code>POST</code> ) &nbsp;and two <a href="https://docs.particle.io/reference/firmware/photon/#particle-variable-">particle.variables</a> ( <code>GET</code> ). One for the color and one for the brightness.</p>



<p class="wp-block-paragraph"><strong>Functions</strong><br>
<code>hex</code>&nbsp; — Accepts an eight digit hex value (RGBW) to be used to set the color. For example: <code>FF000000</code> is Red.<br>
<code>bri</code> — Accepts an <code>int</code> value 0-255 where 0 is off and 255 is 100% bright.</p>



<p class="wp-block-paragraph">You&#8217;ll also need to send your <code>access_token</code>&nbsp;&nbsp;to make&nbsp;the&nbsp;<code>POST</code>&nbsp;request.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
// POST Request URLS
https://api.particle.io/v1/devices/DEVICE_ID/hex/
https://api.particle.io/v1/devices/DEVICE_ID/bri/
</pre></div>


<p class="wp-block-paragraph"><strong>Variables</strong><br>
<code>curBri</code> — Used to retrieve the value of <code>bri</code> returning a 0-255 value.<br>
<code>curHex</code> — Returns the value of <code>hex</code> which is an 8 character string.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
// GET Request URLs
https://api.particle.io/v1/devices/DEVICE_ID/curBri/
https://api.particle.io/v1/devices/DEVICE_ID/curHex/
</pre></div>


<h4 class="wp-block-heading">Usage:</h4>



<p class="wp-block-paragraph">If you&#8217;re using jQuery like me your code may look something like this:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; title: ; notranslate">
//Partical.io Photon setup
particleDeviceID = &quot;1234567890&quot;;
particleDeviceSecret = &quot;ABC123DEFG4567&quot;;
particleAPIServer = &quot;https://api.particle.io/v1/devices&quot;;

function setLedColor(id,token,hexValue,successMessage){
var postURL = particleAPIServer + &quot;/&quot; + id + &quot;/hex/&quot;;

$.ajax({
type: 'POST',
url: postURL,
data: {
args: hexValue,
access_token: token
},
dataType: &quot;json&quot;,
success:(function(data){
if (data&#x5B;'return_value'] == &quot;1&quot;){
ajaxSuccess(successMessage);
}
}),
error :(function (){ ajaxFailed();}),
complete :(function(data){
if (data&#x5B;'return_value'] == &quot;1&quot;){
ajaxSuccess(successMessage);
}
}),
});
}

function setLedBrightness(id,token,brightness,successMessage){
var postURL = particleAPIServer + &quot;/&quot; + id + &quot;/bri/&quot;;

$.ajax({
type: 'POST',
url: postURL,
data: {
args: brightness,
access_token: token
},
dataType: &quot;json&quot;,
success:(function(data){
if (data&#x5B;'return_value'] == &quot;1&quot;){
ajaxSuccess(successMessage);
}
}),
error :(function (){ ajaxFailed();}),
complete :(function(data){
if (data&#x5B;'return_value'] == &quot;1&quot;){
ajaxSuccess(successMessage);
}
}),
});
}

function getLedBrightness(id,token){
var getURL = particleAPIServer + &quot;/&quot; + id + &quot;/curBri/?access_token=&quot; + token;
var result = &quot;&quot;;
$.ajax({
type: 'GET',
url: getURL,
async: false,
success:(function(data){
result = data&#x5B;'result'];
}),
error :(function (){ ajaxFailed();}),
});
return result;
}
//returned on fail
function ajaxFailed() {
$(&quot;.results&quot;).stop().fadeIn().html(&quot;Error Occured, Please Try Again.&quot;).removeClass().addClass(&quot;results alert-error&quot;).delay(3000).fadeOut(2000);
}
//returned on success
function ajaxSuccess(status){
$(&quot;.results&quot;).fadeIn().html( status ).removeClass().addClass(&quot;results alert-success&quot;).delay(3000).fadeOut(2000);
}
</pre></div>


<p class="wp-block-paragraph">Later in your JavaScript you&#8217;ll uses the above functions like the following:</p>



<p class="wp-block-paragraph"><strong>GET</strong> the Brightness</p>


<pre class="brush: jscript; title: ; notranslate">
startBrighness = parseInt(getLedBrightness(particleDeviceID,particleDeviceSecret));</pre>



<p class="wp-block-paragraph"><strong>SET</strong> the Brightness</p>


<pre class="brush: jscript; title: ; notranslate">
startBrighness = parseInt(getLedBrightness(particleDeviceID,particleDeviceSecret));
</pre>



<p class="wp-block-paragraph"><strong>SET</strong> the Color</p>



<p class="wp-block-paragraph"></p>


<pre class="brush: jscript; title: ; notranslate">
setLedColor( particleDeviceID,particleDeviceSecret, &#039;#FF000000&#039; ),&amp;quot;Setting lights to: &amp;quot; + Red );
</pre>



<p class="wp-block-paragraph">Hope that helps get you started and let me know if you have any questions in the commets 🙂</p>
]]></content:encoded>
					
		
		<enclosure url="https://brooke.codes/wp-content/uploads/2017/07/mov_20170702_17202481.mp4" length="29871853" type="video/mp4" />

			</item>
		<item>
		<title>O Christmas Tree! O Christmas Tree!</title>
		<link>https://brooke.codes/2016/12/20/o-christmas-tree-o-christmas-tree/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Wed, 21 Dec 2016 04:58:44 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[maker]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=710</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/12/star_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Star featured" decoding="async" loading="lazy" />Last year while making popcorn and cranberry chains the only thing missing from the tree was a star. One was made posthaste. However, it was missing a very important feature, lighting up. We couldn&#8217;t let that happen two years in a row so this year we added a color changing light to our homemade star. [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/12/star_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Star featured" decoding="async" loading="lazy" />
<p class="wp-block-paragraph">Last year while making popcorn and cranberry chains the only thing missing from the tree was a star. One was made posthaste. However, it was missing a very important feature, lighting up. We couldn&#8217;t let that happen two years in a row so this year we added a color changing light to our homemade star.</p>



<span id="more-710"></span>



<p class="wp-block-paragraph">The hardware is a <a href="https://www.adafruit.com/product/1501">Trinket</a> and single <a href="https://www.adafruit.com/product/1260">Flora NeoPixel</a>&nbsp;both from Adafruit.</p>



<p class="wp-block-paragraph">The software is&nbsp;a slightly modified rainbow effect from the NeoPixel&nbsp;stand test included&nbsp;in<a href="https://github.com/adafruit/Adafruit_NeoPixel"> the library.</a></p>



<p class="wp-block-paragraph"><strong>Happy</strong> <strong>Holidays</strong>!</p>



<figure class="wp-block-image"><img decoding="async" src="https://brooke.codes/wp-content/uploads/2016/12/img_20161220_1914410.jpg" alt="IMG_20161220_1914410.jpg" class="wp-image-714"/></figure>



<figure class="wp-block-video"><video height="1080" style="aspect-ratio: 1920 / 1080;" width="1920" controls src="https://brooke.codes/wp-content/uploads/2016/12/mov_20161220_1914049.mp4"></video></figure>
]]></content:encoded>
					
		
		<enclosure url="https://brooke.codes/wp-content/uploads/2016/12/mov_20161220_1914049.mp4" length="30800344" type="video/mp4" />

			</item>
		<item>
		<title>I want to ride my bike</title>
		<link>https://brooke.codes/2016/03/17/i-want-to-ride-my-bike/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Thu, 17 Mar 2016 17:48:43 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[bikeblink]]></category>
		<category><![CDATA[maker]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=626</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/03/bikeblink_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="BikeBlink featured" decoding="async" loading="lazy" />BikeBlink Part III Once I started to wire the bike light into my 3D Box I quickly learned that while I learned a lot my box was clunky and would have too many wires. That&#8217;s around the same time I learned about custom circuit boards. The first thing I did was watch a few videos [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/03/bikeblink_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="BikeBlink featured" decoding="async" loading="lazy" />
<h3 class="wp-block-heading"><strong>BikeBlink Part III</strong></h3>



<p class="wp-block-paragraph">Once I started to wire the bike light into my<a href="https://brooke.codes/?p=611"> 3D Box</a> I quickly learned that while I learned a lot my box was clunky and would have too many wires. That&#8217;s around the same time I learned about custom circuit boards.</p>



<span id="more-626"></span>



<p class="wp-block-paragraph">The first thing I did was watch a few videos and download the free version of EAGLE. I had the advantage of working with this circuit for a while and pretty much having it memorized. Once In EAGLE I created the schematic and board layout. From there it came down to printing and making though my pull though components would work as expected.&nbsp; I also used the Trinket EAGLE file found on <a href="https://github.com/adafruit/Adafruit-Eagle-Library/pull/18">GitHub</a>.</p>



<figure class="wp-block-gallery has-nested-images columns-3 is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://brooke.codes/wp-content/uploads/2016/03/board_layout.png"><img loading="lazy" decoding="async" width="942" height="978" data-id="639" src="https://brooke.codes/wp-content/uploads/2016/03/board_layout.png" alt="" class="wp-image-639" srcset="https://brooke.codes/wp-content/uploads/2016/03/board_layout.png 942w, https://brooke.codes/wp-content/uploads/2016/03/board_layout-289x300.png 289w, https://brooke.codes/wp-content/uploads/2016/03/board_layout-768x797.png 768w" sizes="auto, (max-width: 942px) 100vw, 942px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://brooke.codes/wp-content/uploads/2016/03/schematic.png"><img loading="lazy" decoding="async" width="1024" height="588" data-id="640" src="https://brooke.codes/wp-content/uploads/2016/03/schematic-1024x588.png" alt="" class="wp-image-640" srcset="https://brooke.codes/wp-content/uploads/2016/03/schematic-1024x588.png 1024w, https://brooke.codes/wp-content/uploads/2016/03/schematic-300x172.png 300w, https://brooke.codes/wp-content/uploads/2016/03/schematic-768x441.png 768w, https://brooke.codes/wp-content/uploads/2016/03/schematic-1536x882.png 1536w, https://brooke.codes/wp-content/uploads/2016/03/schematic.png 1654w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<p class="wp-block-paragraph">I then ordered the boards from <a href="https://oshpark.com/">OSH Park </a>which I highly recommend. Their website is easy to use and provides a board preview which really helped me make sure my screen printing was in order. The boards arrived and everything works as expected.</p>



<figure class="wp-block-gallery has-nested-images columns-3 is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://brooke.codes/wp-content/uploads/2016/03/bikeblink3.jpg"><img loading="lazy" decoding="async" width="640" height="640" data-id="659" src="https://brooke.codes/wp-content/uploads/2016/03/bikeblink3.jpg" alt="" class="wp-image-659" srcset="https://brooke.codes/wp-content/uploads/2016/03/bikeblink3.jpg 640w, https://brooke.codes/wp-content/uploads/2016/03/bikeblink3-300x300.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/bikeblink3-150x150.jpg 150w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://brooke.codes/wp-content/uploads/2016/03/bikeblink4.jpg"><img loading="lazy" decoding="async" width="800" height="495" data-id="660" src="https://brooke.codes/wp-content/uploads/2016/03/bikeblink4.jpg" alt="" class="wp-image-660" srcset="https://brooke.codes/wp-content/uploads/2016/03/bikeblink4.jpg 800w, https://brooke.codes/wp-content/uploads/2016/03/bikeblink4-300x186.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/bikeblink4-768x475.jpg 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://brooke.codes/wp-content/uploads/2016/03/bikeblink1.jpg"><img loading="lazy" decoding="async" width="800" height="450" data-id="657" src="https://brooke.codes/wp-content/uploads/2016/03/bikeblink1.jpg" alt="" class="wp-image-657" srcset="https://brooke.codes/wp-content/uploads/2016/03/bikeblink1.jpg 800w, https://brooke.codes/wp-content/uploads/2016/03/bikeblink1-300x169.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/bikeblink1-768x432.jpg 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://brooke.codes/wp-content/uploads/2016/03/bikeblink2.jpg"><img loading="lazy" decoding="async" width="800" height="450" data-id="658" src="https://brooke.codes/wp-content/uploads/2016/03/bikeblink2.jpg" alt="" class="wp-image-658" srcset="https://brooke.codes/wp-content/uploads/2016/03/bikeblink2.jpg 800w, https://brooke.codes/wp-content/uploads/2016/03/bikeblink2-300x169.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/bikeblink2-768x432.jpg 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://brooke.codes/wp-content/uploads/2016/03/bikeblink_board.png"><img loading="lazy" decoding="async" width="163" height="200" data-id="654" src="https://brooke.codes/wp-content/uploads/2016/03/bikeblink_board.png" alt="" class="wp-image-654"/></a></figure>
</figure>



<p class="wp-block-paragraph">Now that I have a much more compact cleaner version of my board layout next up will be revisiting the enclosure. For the curious, I&#8217;ve released the boards as<a href="https://github.com/BrookeDot/BikeBlink"> Open Source Hardware</a>.</p>



<p class="wp-block-paragraph">&nbsp;</p>



<p class="wp-block-paragraph">&nbsp;</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>I want to ride my bicycle</title>
		<link>https://brooke.codes/2016/03/14/i-want-to-ride-my-bicycle/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Mon, 14 Mar 2016 17:44:39 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[bikeblink]]></category>
		<category><![CDATA[maker]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=611</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/03/3d_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="3d featured" decoding="async" loading="lazy" />BikeBlink Part II Now that I had working code I started thinking about waterproofing. I decided to order a waterproof cable and print a 3D Box. As this was my first time 3D Printing I had no idea what I was doing. I designed a box in AutoDesk 3D and headed to my local maker [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/03/3d_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="3d featured" decoding="async" loading="lazy" /><h3><strong>BikeBlink Part II</strong></h3>
<p>Now that I had<a href="https://brooke.codes/2016/03/12/bicycle-bicycle/"> working code</a> I started thinking about waterproofing. I decided to order a waterproof cable and print a 3D Box. As this was my first time 3D Printing I had no idea what I was doing. I designed a box in AutoDesk 3D and headed to my local maker space to have it printed. Over all I&#8217;m pretty happy with how the box turned out. My original idea was to solder everything into the box. However, I learned this was not as easily done as I was hoping so I&#8217;ll be going another route in terms of enclosures.</p>
<p><span id="more-611"></span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-619" src="https://brooke.codes/wp-content/uploads/2016/03/3dcase.jpg" alt="3Dcase" width="800" height="450" srcset="https://brooke.codes/wp-content/uploads/2016/03/3dcase.jpg 800w, https://brooke.codes/wp-content/uploads/2016/03/3dcase-300x169.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/3dcase-768x432.jpg 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /><img loading="lazy" decoding="async" class="alignnone size-full wp-image-620" src="https://brooke.codes/wp-content/uploads/2016/03/box_solder.jpg" alt="box_solder" width="800" height="450" srcset="https://brooke.codes/wp-content/uploads/2016/03/box_solder.jpg 800w, https://brooke.codes/wp-content/uploads/2016/03/box_solder-300x169.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/box_solder-768x432.jpg 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Bicycle Bicycle</title>
		<link>https://brooke.codes/2016/03/12/bicycle-bicycle/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Sat, 12 Mar 2016 19:29:57 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[bikeblink]]></category>
		<category><![CDATA[maker]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=541</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/03/bike_blink_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Bike blink featured" decoding="async" loading="lazy" />BikeBlink Part I About 10 months ago I had a friend who got hit by a car while on a bike. This lead to stepping up the visibility game. One of the improvements were bike spoke lights.&#160;They serve to increase side visibility while riding. When I first saw this I was just getting into the [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/03/bike_blink_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Bike blink featured" decoding="async" loading="lazy" />
<h3 class="wp-block-heading"><strong>BikeBlink Part I</strong></h3>



<blockquote class="wp-block-quote is-style-info-notice is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Note: </strong>This post refers to code and a project from <em>many</em> years ago <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f631.png" alt="😱" class="wp-smiley" style="height: 1em; max-height: 1em;" />. The content was edited in March of 2025 to remove dead links, improve clarity, or fix formatting, but no other edits were made. Enjoy this time capsule into the past.</p>
</blockquote>



<figure class="wp-block-image alignnone size-full wp-image-552"><img loading="lazy" decoding="async" width="478" height="480" src="https://brooke.codes/wp-content/uploads/2016/03/m204_cover1_2015-478x480-1.jpg" alt="m204_cover1_2015-478x480" class="wp-image-552" srcset="https://brooke.codes/wp-content/uploads/2016/03/m204_cover1_2015-478x480-1.jpg 478w, https://brooke.codes/wp-content/uploads/2016/03/m204_cover1_2015-478x480-1-300x300.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/m204_cover1_2015-478x480-1-150x150.jpg 150w" sizes="auto, (max-width: 478px) 100vw, 478px" /><figcaption class="wp-element-caption">Monkeylight m204 spoke light from Monkeylectric</figcaption></figure>



<p class="wp-block-paragraph">About 10 months ago I had a friend who got hit by a car while on a bike. This lead to stepping up the visibility game. One of the improvements were bike spoke lights.&nbsp;They serve to increase side visibility while riding.</p>



<span id="more-541"></span>



<p class="wp-block-paragraph">When I first saw this I was just getting into the maker space and said to myself, perhaps stupidly, &#8220;I can make that.&#8221; Then went to work.</p>



<p class="wp-block-paragraph">I started researching and landed on the <a href="https://learn.adafruit.com/introducing-trinket/introduction">Adafruit Trinket</a> as my microcontroller of choice. It&#8217;s small, powerful enough and has everything I needed to run my LEDs.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="800" height="615" src="https://brooke.codes/wp-content/uploads/2016/03/adafruit_products_trinket_clear_products_1500_orig.jpg" alt="adafruit_products_trinket_clear_products_1500_ORIG.jpg" class="wp-image-564" srcset="https://brooke.codes/wp-content/uploads/2016/03/adafruit_products_trinket_clear_products_1500_orig.jpg 800w, https://brooke.codes/wp-content/uploads/2016/03/adafruit_products_trinket_clear_products_1500_orig-300x231.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/adafruit_products_trinket_clear_products_1500_orig-768x590.jpg 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">The Trinket has&nbsp;~5.25K bytes of space available for use, and 512 bytes of ram. These&nbsp;limitations would be a good&nbsp;to work with as a challenge to write more efficient code.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="800" height="800" src="https://brooke.codes/wp-content/uploads/2016/03/breadboard.jpg?w=600" alt="breadboard" class="wp-image-578" srcset="https://brooke.codes/wp-content/uploads/2016/03/breadboard.jpg 800w, https://brooke.codes/wp-content/uploads/2016/03/breadboard-300x300.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/breadboard-150x150.jpg 150w, https://brooke.codes/wp-content/uploads/2016/03/breadboard-768x768.jpg 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">After some time I got a working test which flashed though 4 different LED modes switching modes at a press of the button. As an added bonus I added the mode into E<sup>2</sup>PROM(non-volatile&nbsp;memory). This allows the device to turn on in the mode it was using when power was disconnected.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="lightshow" width="500" height="281" src="https://www.youtube.com/embed/BS0jvVxCjgg?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p class="wp-block-paragraph">The code <a href="https://github.com/BrookeDot/BikeBlink/blob/master/bikeblink.ino">is up on GitHub.</a></p>



<p class="wp-block-paragraph">&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
