LeafLabshttp://leaflabs.com/Mon, 13 May 2013 14:30:00 +0000MrSolidSnake745's FF6 Theme on Floppy Diskhttp://leaflabs.com//2013/05/ff6-theme-floppy-disk/<iframe width="770" height="433" src="http://www.youtube-nocookie.com/embed/eX7KZg8ZQj4?rel=0" frameborder="0" allowfullscreen></iframe> <p>MrSolidSnake745 tweeted out this great <a href="https://en.wikipedia.org/wiki/Final_Fantasy_VI">Final Fantasy VI</a> theme song tribute synthesized using floppy disk drives controlled by a Maple board.</p> <p>The code used seems to be <a href="http://www.youtube.com/user/Sammy1Am">SammyIAm</a>'s <a href="https://github.com/SammyIAm/Moppy">Moppy</a>, which runs just fine on Arduinos. There's a whole scene of stepper motor and floppy drive audio projects out there, like that of our friends Open Music Labs (<a href="http://www.openmusiclabs.com/projects/floppy-audio/videos/">videos</a>, <a href="http://www.openmusiclabs.com/projects/floppy-audio/the-basics-how-it-works/">write up</a>), but we think this particular track came out really well!</p>bnewboldMon, 13 May 2013 14:30:00 +0000tag:leaflabs.com,2013-05-13:/2013/05/ff6-theme-floppy-disk/Maple Restock And China Snapshotshttp://leaflabs.com//2013/04/maple-restock-and-china-snapshots/<p><center> <img src="/static/images/posts/20120423_bagging.png" alt="bagging_maples" style="border: 2px solid grey;"> <br><i>Bagging up distributor shipments at <a href="http://industry-lab.com">Industry Lab</a></i> </center></p> <p>After a couple logistical hiccups, we finally shipped out fresh Maple boards to distributors, and a batch of Maple Minis are expected to go out next week. All distributors have been out of stock for many weeks now, and we want to make it clear that the blame lies with us, not our manufacturing and distribution partners. Sorry about that!</p> <p>You might wonder just where our boards are actually manufactured; I certainly did! During a personal trip to China this past January I was able to visit Shenzhen and <a href="http://seeedstudio.com">Seeedstudio</a>, the company that has handled sourcing, PCB fabrication, assembly, and testing for the Maple product line for the past several years.</p> <p>It's impressive how much Seeed has grown in the past few years. They have a small army of young engineers and designers prototyping new devices, and multiple lines for prototyping, testing, and assembly. I liked the space they are working in now: an entire floor of a large industrial building. Not very sexy, but solid, well lit, and with plenty of room for projects, heavy equipment, and toys. Compared to the shiny, expensive, and heavily marketed "incubator hubs" and "innovation centers" in Silicon Valley or Cambridge's Kendall Square, I think this type of older building is much more valuable resource for growing companies who need space of their own to grow and experiment.</p> <p><center> <a href="/static/images/posts/cn201301/eric_bryan.png"> <img src="/static/images/posts/cn201301/eric_bryan.png" width="770px" alt="eric_bryan"> </a> <br><i>Bryan and Eric Pan at the Seeed offices; even in January I worked up a sweat walking around the city</i> </center></p> <p><center> <a href="/static/images/posts/cn201301/assembly.png"> <img src="/static/images/posts/cn201301/assembly.png" width="770px" alt="assembly"> </a> <br><i>Small batch assembly line at the main offices; runs of more than a few hundred units go to a seperate facility nearby</i> </center></p> <p><center> <a href="/static/images/posts/cn201301/violet_stock.png"> <img src="/static/images/posts/cn201301/violet_stock.png" width="380px" alt="violet_stock"></a> <a href="/static/images/posts/cn201301/tester.png"> <img src="/static/images/posts/cn201301/tester.png" width="380px" alt="tester"></a> <br><i>Violet showing me around the stock room; a bank of pogo-pin board testers</i> </center></p> <p><center> <a href="/static/images/posts/cn201301/bench.png"> <img src="/static/images/posts/cn201301/bench.png" width="770px" alt="bench"> </a> <br><i>Electronics work bench</i> </center></p> <p><center> <a href="/static/images/posts/cn201301/packing.png"> <img src="/static/images/posts/cn201301/packing.png" width="770px" alt="packing"></a> <br><i>Testing and Soldering boards</i> </center></p> <p><br><br></p> <p>Of course "no trip would be complete" without a visit to the famous electronics markets...</p> <p><center> <a href="/static/images/posts/cn201301/segbuy.png"> <img src="/static/images/posts/cn201301/segbuy.png" width="380px" alt="segbuy"></a> <a href="/static/images/posts/cn201301/floors.png"> <img src="/static/images/posts/cn201301/floors.png" width="380px" alt="floors"></a> </center></p> <p><center> <a href="/static/images/posts/cn201301/bags.png"> <img src="/static/images/posts/cn201301/bags.png" width="770px" alt="bags"> </a> </center></p> <p><center> <a href="/static/images/posts/cn201301/usb.png"> <img src="/static/images/posts/cn201301/usb.png" width="770px" alt="usb connectors"> </a> </center></p> <p><center> <a href="/static/images/posts/cn201301/buttons.png"> <img src="/static/images/posts/cn201301/buttons.png" width="770px" alt="buttons"> </a> </center></p> <p><center> <a href="/static/images/posts/cn201301/market.png"> <img src="/static/images/posts/cn201301/market.png" width="770px" alt="market"> </a> </center></p> <p><center> <a href="/static/images/posts/cn201301/connectors.png"> <img src="/static/images/posts/cn201301/connectors.png" width="770px" alt="connectors"> </a> </center></p> <p><center> <a href="/static/images/posts/cn201301/pots.png"> <img src="/static/images/posts/cn201301/pots.png" width="380px" alt="pots"> </a> </center></p>bnewboldThu, 25 Apr 2013 12:12:00 +0000tag:leaflabs.com,2013-04-25:/2013/04/maple-restock-and-china-snapshots/Fixed Maple Mini bootloader binary uploadedhttp://leaflabs.com//2013/04/fixed-maple-mini-bootloader/<p>Turns out that the <a href="http://static.leaflabs.com/pub/leaflabs/maple-bootloader/maple_mini_boot.bin">Maple Mini bootloader binary</a> linked to from our <a href="http://leaflabs.com/docs/bootloader.html">bootloader documentation</a> was nonfunctional. It's unclear how that happened, but we've uploaded a fresh bootloader binary which is known to work. Sorry about that!</p>mbolivarWed, 17 Apr 2013 11:32:00 +0000tag:leaflabs.com,2013-04-17:/2013/04/fixed-maple-mini-bootloader/New Website Backendhttp://leaflabs.com//2013/02/new-website-backend/<p><center> <img src="/static/images/posts/library_vending_machine.jpg"> <br><em>Cryptic vending-machine-as-library in Shenzhen, CN</em> </center></p> <p>We have switched to a new website backend, using <a href="http://getpelican.com">Pelican</a> to statically generate HTML files. As noted <a href="http://forums.leaflabs.com/topic.php?id=10227">last week</a>, we don't have a mechanism for direct comments on posts right here any more, so please discuss this post (and future ones) in the forums <a href="http://forums.leaflabs.com/forum.php?id=11">here</a>! There was not a direct way to keep old comments attached to their pages, but they have been archived and are accessible via a link at the bottom of every blog post.</p> <p>If you subscribe to our RSS feed, the URL should not have changed, but slight changes in XML syntax may mean you get spammed by a re-listing of all our old posts. Sorry in advance!</p> <p>I did my best to re-point image references and preserve old post URLs; if anything breaks please <a href="/contacts/">drop us a line</a>.</p>bnewboldFri, 15 Feb 2013 16:00:00 +0000tag:leaflabs.com,2013-02-15:/2013/02/new-website-backend/more state of the maplehttp://leaflabs.com//2013/02/more-state-of-the-maple/<p>So it would appear that LeafLabs has done a pretty bad job the past few months of keeping everyone in the loop, and for that we definitely apologize. So here’s a status report, and a look at what’s in the pipeline.</p> <p>First off, we want to say that <strong>Maple and Maple Mini will be available for the foreseeable future</strong>. There is no intention of discontinuing either product line; we plan to keep making and selling them as long as people are interested in buying. So don’t panic! If you’ve got a Maple-based project (or were planning one), you should be able to get your hands on new boards as you need them.</p> <p>The bad news is that <strong>there are no concrete plans to expand our hobby line at the current time</strong>. Unfortunately, at the moment it’s just not financially viable. We hope this will change in the near future! We’ve been exploring some industry partnerships, and there’s also hope that some of the other projects we’ve been working on (outside the hobby-hardware space) will become lucrative enough to fund expansion of Maple and related products. But nothing has solidified yet. We will try to keep you updated as things develop.</p> <p>Despite this, <strong>we do plan on continuing to maintain Maple</strong>, that is, fixing bugs, accepting patches, responding to questions, and keeping you all abreast of awesome new Maple-related projects. This hasn’t been going so well recently, and for that we apologize. But we’re going to do better! We’ve got lots of plans for how to do that, not the least of which includes bringing Bryan Newbold (bnewbold from the forums) back on board to help out. So keep your eyes peeled for a blog post with more details in the very near future.</p> <p>In the meantime, thanks for sticking with us.</p>jessbFri, 01 Feb 2013 17:03:00 +0000tag:leaflabs.com,2013-02-01:/2013/02/more-state-of-the-maple/Making libmaple compile fasterhttp://leaflabs.com//2012/08/2549/<p>Recently, we've been playing around with ways to get <a href="http://leaflabs.com/docs/libmaple.html">libmaple</a> to compile faster. We've been able to get good results (0.1 seconds for a full build); this post summarizes them. Results were obtained with the <a href="http://leaflabs.com/docs/unix-toolchain.html">UNIX toolchain</a>, but it might be interesting to try to port them over to the <a href="http://leaflabs.com/docs/ide.html">IDE</a>. All timing results are for building <a href="https://github.com/leaflabs/libmaple/blob/0cc911c4aee2f8695f0ee93f2a189b5e0e259fb9/examples/blinky.cpp">blinky.cpp</a> on today's libmaple master (<a href="https://github.com/leaflabs/libmaple/tree/0cc911c4aee2f8695f0ee93f2a189b5e0e259fb9/">0cc911c</a>) using a quad-core hyper-threaded CPU (an Intel i7-3770 at 3.4 GHz).</p> <p>TLDR: <ol> <li>Use make's -j flag to parallelize the build</li> <li>Use ccache to save old build files</li> </ol> <!--more--><strong>Use make's <code>-j</code> flag for parallel builds:</strong> this one is a no-brainer.</p> <p>Building with <code>make -jN</code> allows N separate jobs (e.g. compilations) to proceed at the same time. The "right" value of N depends on the computer you're using to build libmaple; we usually use the common heuristic N = number of cores.</p> <p>Without -j:</p> <div class="codehilite"><pre>$ time make [...] real 0m3.570s user 0m2.664s sys 0m0.400s </pre></div> <p>That's 3.570 seconds of wall clock time. With -j8:</p> <div class="codehilite"><pre>$ time make -j8 [...] real 0m0.825s user 0m3.788s sys 0m0.476s </pre></div> <p>0.825 seconds, or a little <strong>more than a 4x speedup</strong>. (<code>make -j4</code> usually results in ~1 second builds; increasing N beyond 8 seems to have little effect.)</p> <p><strong>Use ccache to cache old build files:</strong> We recommend this in general, but it really shines if you use more than one kind of Maple board (regular Maple, Maple Mini, etc.) or have to <code>make clean</code> a lot for some other reason.</p> <p><a href="http://ccache.samba.org/">ccache</a> is a compiler cache. It saves the results of old compilations, letting you reuse them even if you've deleted the versions in the libmaple build directory. Since you have to run <code>make clean</code> before rebuilding libmaple when switching boards, having a cache of libmaple's object files for the other board saves time when you switch back.</p> <p>Results using ccache with an empty cache:</p> <div class="codehilite"><pre>$ time make [...] real 0m4.489s user 0m3.056s sys 0m0.488s </pre></div> <p>Running it multiple times, it seems that this number (~4.5 seconds) is typical. Note that that's a little under a second more than building libmaple without ccache. The extra time is presumably spent warming up the cache.</p> <p>The results when rebuilding libmaple with a warm cache are pretty impressive:</p> <div class="codehilite"><pre>$ make clean; time make real 0m0.352s user 0m0.064s sys 0m0.040s </pre></div> <p>That's <strong>more than a 10x speedup</strong> over rebuilding libmaple without ccache.</p> <p>If you'd like to try this for yourself, you can use the following libmaple patch:</p> <div class="codehilite"><pre>$ diff --git a/support/make/build-rules.mk b/support/make/build-rules.mk <span class="gh">index 3d541ba..1a2abbb 100644</span> <span class="gd">--- a/support/make/build-rules.mk</span> <span class="gi">+++ b/support/make/build-rules.mk</span> <span class="gu">@@ -1,9 +1,9 @@</span> # Useful tools <span class="gd">-CC := arm-none-eabi-gcc</span> <span class="gd">-CXX := arm-none-eabi-g++</span> <span class="gi">+CC := ccache arm-none-eabi-gcc</span> <span class="gi">+CXX := ccache arm-none-eabi-g++</span> LD := arm-none-eabi-ld -v AR := arm-none-eabi-ar <span class="gd">-AS := arm-none-eabi-gcc</span> <span class="gi">+AS := ccache arm-none-eabi-gcc</span> OBJCOPY := arm-none-eabi-objcopy DISAS := arm-none-eabi-objdump OBJDUMP := arm-none-eabi-objdump </pre></div> <p>(Save the patch to a file, then run <code>$ git apply the-file-name</code> from within libmaple).</p> <p><strong>Parting shot</strong>: the combination of the two (make -j8 plus warm cache):</p> <div class="codehilite"><pre>$ make clean; time make -j8 [...] real 0m0.132s user 0m0.064s sys 0m0.020s </pre></div> <p>About a <strong>27x speedup</strong> over  plain <code>make</code>. Which is awesome, but note that it's less than the product of the speedups of using -j8 (4x) and ccache (10x). Presumably the fixed overhead is non-parallelizable, non-cacheable build tasks like the final link.</p>mbolivarWed, 01 Aug 2012 15:02:00 +0000tag:leaflabs.com,2012-08-01:/2012/08/2549/LeafLabs is going to the Kingsport Mini Maker Fairehttp://leaflabs.com//2012/07/leaflabs-is-going-to-the-kingsport-mini-maker-faire/<p>Quick heads-up: we'll be attending the Mini Maker Faire in <a href="http://makerfairekingsport.wordpress.com/">Kingsport, TN</a> on Sunday, July 15. Hope to see you there!</p>mbolivarTue, 10 Jul 2012 12:03:00 +0000tag:leaflabs.com,2012-07-10:/2012/07/leaflabs-is-going-to-the-kingsport-mini-maker-faire/libmaple: new include style on the wayhttp://leaflabs.com//2012/07/libmaple-new-include-style-on-the-way/<p>As noted in a previous post about <a href="http://leaflabs.com/2012/06/major-update-experimental-stm32f2-and-f1-value-line-in-libmaple-master/">libmaple's support for new STM32 series</a>, there are some <a href="http://en.wikipedia.org/wiki/Deprecation">deprecations</a> coming. This blog post is a heads-up about the most important one: libmaple's getting a new include style. (We're working on making these changes unintrusive to MapleIDE users; read on after the jump for the details). To help you migrate your code, the old style will still work for <em>exactly one more</em> libmaple release: it will work in v0.0.13, but will break <em>immediately after that</em>.</p> <p>So what's changing? In short, you'll need to include Wirish headers (like wirish.h) like this:</p> <div class="codehilite"><pre><span class="c">#include &lt;wirish/wirish.h&gt; // new style, works with libmaple from GitHub</span> </pre></div> <p>instead of like this:</p> <div class="codehilite"><pre><span class="c">#include &quot;wirish.h&quot; // OLD style, now deprecated</span> </pre></div> <p>You'll need to include libmaple headers (like i2c.h) like this:</p> <div class="codehilite"><pre><span class="c">#include &lt;libmaple/i2c.h&gt; // new style, works with libmaple from GitHub</span> </pre></div> <p>instead of like this:</p> <div class="codehilite"><pre><span class="c">#include &quot;i2c.h&quot; // OLD style, now deprecated</span> </pre></div> <p>Details (including why the changes are necessary) after the jump.<!--more--></p> <p>First off, <strong>we don't expect many problems for IDE users</strong>, since:</p> <ol> <li><a href="http://leaflabs.com/docs/ide.html">Maple IDE</a> automatically includes wirish.h for all IDE code. As you can see from the <a href="https://github.com/leaflabs/libmaple/blob/v0.0.12/wirish/wirish.h#L33">v0.0.12 wirish.h</a>, it's a mother of a header which pulls in almost everything the library has to offer. Because of that, most code written for Maple IDE doesn't need any extra includes. Usually, you'll only need extra includes for the low-level header files for libmaple proper (the C layer that lies underneath the Wiring/Arduino compatibility code). If you don't use these low-level libraries, your code will likely not need to change. If you <em>are</em> using those low-level interfaces, we expect that a change in include style probably won't trip you up ;).</li> <li><a href="http://leaflabs.com/docs/libraries.html">Libraries</a> you use from the IDE's drop-down menus insert their <code>#include</code> lines automatically. This means new code using libraries will use the new style by default. Old code will need to change to e.g. <code>#include &lt;Servo/Servo.h&gt;</code>. If this seems like a big problem to you, <strong>please let us know</strong>. We can always special-case libraries within the IDE so you can just include them as e.g. <code>#include "Servo.h</code>" if that seems like a good idea.</li> </ol> <p>The new style came about for a couple of reasons:</p> <ul> <li>It's pretty standard usage for libraries</li> <li>It allows different header files with the same file name</li> </ul> <p>The second of these is what made it worth the pain of forcing people to migrate their code.</p> <p>For example, we've got a variety of <code>foo.h</code> in libmaple now -- the main <code>&lt;libmaple/foo.h&gt;</code> header, and the series-specific <code>&lt;series/foo.h&gt;</code> headers in <a href="https://github.com/leaflabs/libmaple/tree/master/libmaple/stm32f1/include/">libmaple/stm32f1/include/</a> and <a href="https://github.com/leaflabs/libmaple/tree/master/libmaple/stm32f2/include/">libmaple/stm32f2/include/</a>. This infrastructure is necessary to make it possible to compile libmaple for multiple STM32 series (it's a standard C trick we're borrowing from the Linux kernel, which has e.g. the portable &lt;<a href="http://lxr.linux.no/#linux+v3.4.4/include/linux/atomic.h">linux/atomic.h</a>&gt;, which in turn includes a per-architecture <code>&lt;asm/atomic.h&gt;</code>).</p> <p>For another example, consider the <a href="http://wiring.org.co/reference/libraries/SPI/index.html">Wiring</a> or <a href="http://arduino.cc/en/Reference/SPI">Arduino</a> SPI libraries: they're included as plain <code>SPI.h</code>, which conflicts with libmaple's <a href="http://leaflabs.com/docs/libmaple/api/spi.html">spi.h</a> on case-insensitive filesystems (like those that come with OS X and Windows). The include style change makes it possible to have both headers available at the same time. We get questions about the SPI library periodically from users porting Wiring or Arduino code to Maple:  <code>#include "SPI.h"</code> works, so people naturally expect the library to be present. But then the code mysteriously fails to compile, and confusion reigns. Having this new include style will help people figure out what's wrong sooner.</p> <p>If you're curious about this or any of the other upcoming changes, we encourage you to try out the new libmaple using the <a href="http://leaflabs.com/docs/unix-toolchain.html">command-line toolchain</a> (an IDE pre-release with the new library is still a ways off, unfortunately). Any and all feedback is welcome; make your voice heard on the forum, via email, etc.</p>mbolivarMon, 02 Jul 2012 13:58:00 +0000tag:leaflabs.com,2012-07-02:/2012/07/libmaple-new-include-style-on-the-way/Major update: STM32F2 and F1 value line in libmaple master!http://leaflabs.com//2012/06/major-update-experimental-stm32f2-and-f1-value-line-in-libmaple-master/<p>It took forever, but the <a href="http://leaflabs.com/docs/libmaple.html">libmaple</a> work we've been doing to prepare for the in-development Maple 2 is finally in a state where we think it's ready to live in the  <a href="https://github.com/leaflabs/libmaple/commit/ccc23369719f8909fe61a8423fdf382582414702">master branch on GitHub</a>. The major new features are:</p> <ul> <li><a href="https://github.com/leaflabs/libmaple/commit/2fb91678e08fc25299d70b1500495bbe06ee61be">STM32F1 value line support</a>, thanks to Anton Eltchaninov</li> <li>Experimental support for <a href="http://www.st.com/internet/mcu/subclass/1520.jsp">STM32F2</a> series microcontrollers</li> <li>Significantly simplified method for adding support for your own boards</li> </ul> <p><strong><a href="http://leaflabs.com/docs/unix-toolchain.html">Command-line toolchain</a> users: please try it out!</strong> Though there are tons of changes (and some deprecations), it's a top priority to keep old code working. Your existing Maple, Maple Mini, etc. programs should work unchanged with this new libmaple. Please test them out and report any bugs or other regressions to <a href="mailto:info@leaflabs.com">info@leaflabs.com</a> or on the <a href="http://forums.leaflabs.com/">forum</a>, so we can iron them out before the next release. More details on these long-awaited changes after the jump.</p> <!--more--> <p>Adding support for STM32F2 was the major task we needed for Maple 2. Though Maple 2 will have an STM32F4, F2 support was an important prerequisite (F4s are basically F2s with faster clocks and hardware floating point support). Now that that's largely done, we'll be working on the necessary tweaks to get things running on F4.</p> <p>Adding F2 support was no small task. <a href="http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/DM00033267.pdf">ST Application note 3427</a> (AN3427) describes ST's official recommendations for migrating code for STM32F1 microcontrollers (like what's on Maple and all other LeafLabs boards released to date) to STM32F2. ST's firmware libraries for F1 and F2 are totally different, and many of the peripherals' register interfaces have changed as well. Because of that, in many cases, ST's recommendations amount to "you'll need to rewrite it all."</p> <p>Given our mission to make the STM32 easy to use, it probably goes without saying that we found AN3427-style migration... unsatisfactory. From this dissatisfaction, the new and improved libmaple was born.</p> <p>Following the grand C tradition of portable interfaces, with carefully segregated target-specific implementations, we've partitioned libmaple and Wirish into portable and nonportable sections. The nonportable sections largely exist to provide F1- or F2-specific implementations of common interfaces that work everywhere. This means that, in many cases, switching from F1 to F2 is no harder than changing some command line flags when you build libmaple; your code itself can often go unchanged. This <a href="https://github.com/leaflabs/libmaple/blob/ccc23369719f8909fe61a8423fdf382582414702/examples/test-usart-dma.cpp">example program using USART with DMA</a> illustrates the point: the same code works on F1 and F2, even though the DMA peripherals on each are completely different.</p> <p>This work made it simple to port Wirish (the Wiring/Arduino compatibility layer) to STM32F2. The directories <a href="https://github.com/leaflabs/libmaple/tree/ccc23369719f8909fe61a8423fdf382582414702/wirish/stm32f1">wirish/stm32f1</a> and <a href="https://github.com/leaflabs/libmaple/tree/ccc23369719f8909fe61a8423fdf382582414702/wirish/stm32f2">wirish/stm32f2</a> contain the series-specific pieces of the library. Go take a look at them if you're curious: there's almost nothing inside. libmaple's C layer really does end up doing almost all of the heavy lifting.</p> <p>Of course, it's not all sunshine and unicorn giggles. Here are the known issues and gotchas:</p> <ul> <li>Some existing libmaple interfaces were too F1-specific, and just couldn't port. We're deprecating those to encourage you to move to the new portable interfaces. A detailed changelog and porting guide is in the works, and our documentation will cover things as thoroughly as you've come to expect.</li> <li>F2 support is still experimental, and some pieces are missing. In particular, there's no i2c.h or HardwareSPI on F2 yet.</li> <li>F2 is currently missing USB support, and we don't expect to add it by the time the next release rolls around.</li> </ul> <p>That said, we're excited to get this into master, and we really hope you try it out. Happy hacking!</p>mbolivarWed, 27 Jun 2012 12:42:00 +0000tag:leaflabs.com,2012-06-27:/2012/06/major-update-experimental-stm32f2-and-f1-value-line-in-libmaple-master/Maple Mini now available from SparkFun!http://leaflabs.com//2012/06/maple-mini-now-available-from-sparkfun/<p>You can now <a href="http://www.sparkfun.com/products/11280">buy Maple mini directly from SparkFun</a>. Check out their awesome New Product Friday video, embedded below.</p> <p><center> <iframe width="560" height="315" src="http://www.youtube.com/embed/0o0k_1HiNYA" frameborder="0" allowfullscreen></iframe> </center></p> <p>Yay SparkFun! We're very excited for them to be carrying Minis as well as the standard Maple.</p>jessbFri, 08 Jun 2012 10:55:00 +0000tag:leaflabs.com,2012-06-08:/2012/06/maple-mini-now-available-from-sparkfun/... and we're back!http://leaflabs.com//2012/05/and-were-back/<p>Our hosting service was having some datacenter issues, which led to about an hour's downtime here at leaflabs.com. Things look like everything's up and running, but let us know if you experience any problems with the site. Thanks!</p>mbolivarWed, 23 May 2012 20:03:00 +0000tag:leaflabs.com,2012-05-23:/2012/05/and-were-back/State of the Maple Reduxhttp://leaflabs.com//2012/04/state-of-the-maple-redux/<p>The current manufacturing run of Maples and Maple Minis is done and en route to us. If you're impatient, you can already buy them from <a href="http://www.seeedstudio.com/depot/">Seeed Studio</a>: <a href="http://www.seeedstudio.com/depot/leaf-maple-cortex-m3-p-670.html?cPath=132_137">Maple</a> and <a href="http://www.seeedstudio.com/depot/maple-mini-p-861.html?cPath=132_137">Maple Mini</a>. Regarding distribution, we are (hopefully) no longer going to be selling boards directly from our site any more, and instead will be relying solely on distributors. We'll keep you guys updated regarding which boards are available where, as that occurs over the next couple of weeks.</p> <p>Point of interest: these boards should be functionally identical to the previous revisions, but with a couple of minor changes and additions to the silkscreens. Most notably, the silkscreens now indicate a max input voltage of 5V. The power circuitry is unchanged, but there was continual confusion over how much current could safely be pulled at varying voltage inputs, so now the party line is 5V max. If you were safely running off a higher voltage previously, it should still work fine. More information about power regulation on Maple and Maple Mini can be found <a href="http://leaflabs.com/docs/hardware/maple.html#powering-the-maple">here</a>. In addition, we pulled off a diode on Maple Mini so the USB 5V line is accessible from the VIN pin. Refer to the <a href="http://github.com/leaflabs/maplemini">schematic</a> for details.</p> <p>Last but not least, Maple II and Maple Native II designs have been sent out for prototyping! So we should have the first release candidates in our hands within a week or two. We'll keep you updated.</p> <p><img alt="" src="/static/images/old/2012/04/MNII-770x407.png" title="MNII" /></p>jessbMon, 30 Apr 2012 14:29:00 +0000tag:leaflabs.com,2012-04-30:/2012/04/state-of-the-maple-redux/That's the last of 'em!http://leaflabs.com//2012/03/thats-the-last-of-em/<p>We're now officially sold out of Maple RET6s. Thanks to everyone who purchased one! As you may have noticed, this leaves our <a href="http://leaflabs.com/store/">store page</a> looking rather sad and empty. The reason for this is threefold.</p> <p>First, as we detailed in <a href="http://leaflabs.com/2012/02/state-of-the-maple/">this post</a>, we're in the process of shaking up the Maple line a bit, working on getting some new boards out the door, phasing out others. So Maple RET6 and Maple Native in its Beta form will no longer be available, but keep an eye out for Maple II and Maple Native II (both featuring the <a href="http://www.st.com/internet/mcu/subclass/1521.jsp">STM32 F4 line</a>) in the near future.</p> <p>Second, we're just straight up running low on stock. Our apologies! We just ordered a giant batch of Maples and Maple Minis, and we're expecting to get those in sometime in the next three weeks, so we appreciate your patience.</p> <p>Third, we're hoping to move away from selling boards from our own store page, and to instead deal exclusively through <a href="http://leaflabs.com/distributors/">our distributors</a>. The overhead of packaging and shipping so many boards is just too intensive for a small shop like ours. Limited/initial/beta runs of boards may still be available on our site, but for the most part distributors are gonna be the place to go. You can definitely hit them up right away to snag a Maple, though Mini is going to have to wait for the new shipment to come in.</p> <p>Hope that covers any questions or concerns you may have had -- leave us a comment if there's anything we didn't cover. Thanks for reading!</p>jessbWed, 28 Mar 2012 15:08:00 +0000tag:leaflabs.com,2012-03-28:/2012/03/thats-the-last-of-em/State of the Maplehttp://leaflabs.com//2012/02/state-of-the-maple/<p>Hey guys, as you may have noticed, the LeafLabs store is currently running pretty low on stock, and we’ve also been making some vague statements around the forums about the impending move to the F4 line. So, we just wanted to give everybody a quick heads up on where we are in terms of product availability and development.</p> <ul> <li><strong>Maple r5</strong> is currently out of stock, but please be assured we plan to continue manufacturing and supporting Maple r5 for the foreseeable future. We’ve got another run in production so we should be carrying them again soon. In the meantime, r5 is still readily available from our <a href="”http://leaflabs.com/distributors/”">distributors</a>.</li> <li><strong>Maple Mini</strong> is also out of stock, and will also be manufactured and supported for the foreseeable future. Unfortunately, the Maple Mini is sold out at all distributors at the moment, but we do currently have another run in production, along with the r5s. Expect to see them back in stock within 60 days, maximum.</li> <li><strong>Maple RET6</strong> is still available, but once this run is gone we do not intend on manufacturing more. In general, the RET6 is just not terribly popular, and in the future the F4 version should provide the “level up” option that made the RET6 appealing. We’re going to be selling the remaining stock at a sale price of $44.99, so get ‘em while they last.</li> <li><strong>Maple Native</strong> beta run is over, and we got a lot of good feedback about the board. At this point, our intention is to redesign Maple Native to support the F4 chip, so there’s going to be a gap in availability until the F4 line is ready. A few people have asked about form factor compatibility, in the interest of going ahead and making shields. The current plan is to keep any future models more or less compatible with the beta version. We may end up swapping out the unpopulated 3x16 header at the end of the board for a high density header. If you’ve got concerns about changes, please don’t hesitate to drop us a line.</li> <li><strong>Maple II</strong> is our up-and-coming F4 line board! We’re hard at work retooling libmaple to support F4, and finalizing the hardware design. Expect a post soon with more details on what we’re planning, and a chance for feedback.</li> <li><strong>Oak</strong> is also still in development -- we haven’t forgotten about it, we promise! Unfortunately, Oak development tends to take second fiddle to Maple issues, so progress has been slower than we’d like. At this point, we have a mostly-functional prototype in house and we are working on bringing up all the peripherals. Currently, the plan is also to use an F4 on Oak.</li> </ul> <p>Thanks for your continuing support of LeafLabs and Maple. We hope you’re as excited about the new projects as we are.</p>jessbWed, 15 Feb 2012 16:14:00 +0000tag:leaflabs.com,2012-02-15:/2012/02/state-of-the-maple/Audio Looping with Maple Nativehttp://leaflabs.com//2011/11/audio-looping-with-maple-native/<p>Recently, our friends over at <a href="http://openmusiclabs.com">Open Music Labs</a> created an awesome little shield for Maple and Arduino they call the <a href="http://www.openmusiclabs.com/projects/audio-codec-shield/arduino-audio-codec-shield/">Audio Codec Shield</a>. The Audio Codec Shield can pump 44k 16-bit audio samples per second into and out of your Maple sketches. What happens to those samples in a sketch is entirely up to you. The guys at Open Music Labs really went above and beyond and created a great library and set of examples to go along with the Codec Shield. In just a few seconds you can load up an example for a delay effect, a flanger, a tremolo, a sine generator, or an LFO. Overall, the shield is great!</p> <p>By coincidence, we got one of these shields right around the same time as the Maple Native Beta boards came in. These boards have a full 1MB of external memory, so obviously we had to wire one up to an Audio Codec Shield and see what we could do with it. We were able to change just a few lines from the “fixed delay” example code and turn that 1MB of ram into a full 11 seconds of audio buffer for a loop pedal! Check out the video to see our little Maple Native Looper in action. Sorry for cheesy guitar playing! Check out the <a href="https://github.com/leaflabs/projects/tree/master/audio-loopie">code</a> to see how it works, and compare it against the effect.</p> <p><center> <object width="500" height="281"><param name="movie" value="http://www.youtube.com/v/SQVLaHIw_TY?version=3&#038;feature=oembed"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/SQVLaHIw_TY?version=3&#038;feature=oembed" type="application/x-shockwave-flash" width="500" height="281" allowscriptaccess="always" allowfullscreen="true"></embed></object> </center></p> <p>Have you done anything fun with audio and a Maple? Let us know!</p>poslathianWed, 16 Nov 2011 12:14:00 +0000tag:leaflabs.com,2011-11-16:/2011/11/audio-looping-with-maple-native/We're teaming up with Wiring!http://leaflabs.com//2011/11/were-teaming-up-with-wiring/<p>Good news, everyone! LeafLabs and <a href="http://wiring.org.co/">Wiring</a> are teaming up to make a single IDE and libraries that will work on all of our boards!</p> <p>For those who might not know about Wiring: it's an awesome open source hardware and software project, the very first to port the Processing environment to work with microcontrollers. Wiring was started by Hernando Barragán of the Universidad de los Andes in Colombia, and is headed up by him and a team of volunteers. We think Wiring is fantastic, and we've been talking with them for a while about how we might work together.</p> <p>Well, those talks are turning into reality.  Now that Wiring is finished with their <a href="http://wiring.org.co/download/">their 1.0 release</a>, we're ready to work together to move the <a href="http://leaflabs.com/docs/ide.html">Maple IDE</a> over to Wiring's. This means that, in the future, you'll be programming Maple from the Wiring IDE.</p> <p><img alt="" src="/static/images/old/2011/10/verify1.jpg" title="Wiring IDE" /></p> <p>As many of you know, there are approximately twenty million Wiring IDE forks, clones, and sister projects out there. It's like the old story goes: Processing begat Wiring's IDE, Wiring's begat Arduino's, and Arduino's begat LeafLabs', etc.</p> <p>That's crazy! Open source history is full of examples where too much forking drives everybody nuts, makes for a ton of wasted effort, confusing user experiences, etc. etc. So, instead of adding to the confusion, we're glad to be putting our efforts towards the mature, well-tested, and continually-evolving Wiring IDE.</p> <p>Well, you say, that's all motherhood and the flag, but what about the libraries I use to program my Maple? What's going to happen to those? Am I going to have to throw everything away? Oh noes! It's gonna be another <a href="http://wiki.python.org/moin/Python2orPython3">Py3K</a> or <a href="http://dev.perl.org/perl6/">Perl 6</a>! Run away!</p> <p>Relax. We don't want that to happen either. We're still going to continue developing <a href="http://leaflabs.com/docs/libmaple.html">libmaple</a> on our own, and all of us at Wiring and LeafLabs are committed to maintaining compatibility with previous releases whenever it's possible.</p> <p>However, we're not going to lie to you. The existing code was developed for different architectures, and it's not going to be possible to achieve 100% compatibility. We'd be selling snake oil if we told you anything different. We're not trying to turn Maple into Wiring. Instead, we're lovingly crafting a subset of both of our libraries that will work the same on both of our boards.  Since "subset of both of our libraries" is an unappetizing mouthful, we're calling it the <em>Wiring Framework</em> for short. If you find some random code on the internet that uses only features from the Wiring Framework, you'll know it works on both Maple and Wiring. However, if you want to use Maple- or Wiring-specific features, those will all still be there.</p> <p>We hope you're as excited about this as we are! While it's still early days, we'll be sure to keep you posted as things progress.</p>mbolivarThu, 03 Nov 2011 15:14:00 +0000tag:leaflabs.com,2011-11-03:/2011/11/were-teaming-up-with-wiring/Wizzin through the Ether... nethttp://leaflabs.com//2011/10/wizzin-through-the-ether-net/<p>We got our hands on a few <a href="http://www.wiznet.co.kr/Sub_Modules/kr/product/Product_Detail.asp?cate1=5&amp;cate2=42&amp;cate3=0&amp;pid=1160">WIZ820io</a>s:</p> <p><center><img src="http://www.wiznettechnology.com/Admin_Root/UpLoad_Files/ProductImgs/Dtl_1161_20110919151726.jpg" alt="El dios de la internet"></center></p> <p>This nifty little beast lets you connect to your <a href="http://leaflabs.com/docs/hardware/maple.html">Maple</a> to the network. With one <a href="http://leaflabs.com/docs/spi.html">SPI</a> and three digital <a href="http://leaflabs.com/docs/gpio.html">IO</a>s, you have the whole Internet in your hands.</p> <p>So what's this good for?</p> <p>Sometimes, when you're working on a project, you'll need a user interface. If you are the only person interfacing with your project, you can throw together a simple <a href="http://leaflabs.com/docs/lang/api/serialusb.html#lang-serialusb">serial</a> protocol, where you type a command in the form of a character and then read back a character response. For more elaborate projects, you might find that you want to send longer commands to your device, read back more comprehensive results, or simply present a more beautiful interface. We wanted programmers to be able to generate interfaces that would be simple to use and easily extendable. To that end, we've ported and expanded two of Wiznet's sample projects – a <a href="http://www.wiznet.co.kr/UpLoad_Files/ReferenceFiles/W5200_Telnet_AN_v1.0_en.pdf">telnet interface</a> and a <a href="http://www.wiznet.co.kr/UpLoad_Files/ReferenceFiles/W5200_TCP_AN_v1.0_en.pdf">web server</a> – for the <a href="http://leaflabs.com/docs/ide.html">Maple IDE</a> and <a href="http://leaflabs.com/docs/unix-toolchain.html">command line toolchain</a>.</p> <p>The telnet interface offers a great balance between control and flexibility. Here's a screenshot of a telnet session with a <a href="http://leaflabs.com/docs/hardware/maple-mini.html">Maple Mini</a>:</p> <p><center><img src="/static/images/old/2011/10/telnet_session.png" alt="telnet_session"></center></p> <p>Maybe the command line isn't your thing. Well, web servers are always cool, with their buttons and text boxes. Here's an example web server (note: originally a different name was on top, but the legal department advised against it):</p> <p><img alt="" src="/static/images/old/2011/10/maple_search_start4-770x451.png" title="maple_search_start" /></p> <p>Here's what happens when you press "search":</p> <p><img alt="" src="/static/images/old/2011/10/maple_search_result4-770x451.png" title="maple_search_result" /></p> <p>There are many ways in which this design can be expanded, and it's a fun way to get into HTML. The user input is not just limited to reading text. You can also use forms with check boxes, radio buttons or combo boxes.</p> <p>Want to try this out for yourself? The <a href="http://wiki.leaflabs.com/index.php?title=WizEthernet" title="wizEthernet Wiki">wizEthernet</a> wiki page will help you get started. We're looking forward to seeing all the beautiful websites everyone cooks up with this!</p> <p>Here's our Maple Mini web server:</p> <p><img alt="" src="/static/images/old/2011/10/wizEthernet-770x575.jpg" title="wizEthernet" /></p>cospanTue, 18 Oct 2011 12:12:00 +0000tag:leaflabs.com,2011-10-18:/2011/10/wizzin-through-the-ether-net/PyMitehttp://leaflabs.com//2011/09/pymite/<p>We've got our blink on... Python style!</p> <p>If you haven't had a chance to check out the specs on <a href="http://leaflabs.com/devices/#Maple-Native" title="Blatant Advertisement">Maple Native</a>:</p> <ul> <li>72MHz</li> <li>1MB external SRAM</li> <li>DACs</li> <li>I2Cs</li> <li>SPIs</li> <li>UARTs</li> <li>ADCs</li> <li>FSMC</li> </ul> <p>To summarize, its got some junk in the trunk.</p> <p>Last week we had a meeting to figure out a good way to demonstrate why EVERYBODY will not be able to live without it, and AJ chimes in with: "Has anybody played around with PyMite?"</p> <p>PYTHON!... on a microcontroller! That you can interact with!  At runtime! Tooo good to be true.</p> <p>Took me a week of randomly banging on a keyboard but yesterday we typed blinky into interactive pymite (IPM) and... let's just say I'm giddy.</p> <p><center> <img alt="" src="/static/images/old/2011/09/Screenshot-1.png" title="Interactive PyMite Session" /> </center></p> <p>Anyway, we think it might be ready for some users to play around with. It's still rough around the edges, but if you've got a Maple Native or a Maple RET6 Edition and want to partake in some luscious Python goodness, then grab the latest release from our projects repo on GitHub (sorry, but this little slice of heaven is currently only usable from the <a href="http://leaflabs.com/docs/unix-toolchain.html">command line</a> toolchain):</p> <div class="codehilite"><pre><span class="err">$</span> <span class="n">git</span> <span class="n">clone</span> <span class="n">git</span><span class="o">:</span><span class="c1">//github.com/leaflabs/projects.git</span> </pre></div> <p>Then follow the hastily written up <a href="http://wiki.leaflabs.com/index.php?title=PyMite">instructions on the wiki</a>.</p> <p>Dave</p>cospanFri, 23 Sep 2011 15:09:00 +0000tag:leaflabs.com,2011-09-23:/2011/09/pymite/Maple IDE 0.0.12http://leaflabs.com//2011/09/maple-ide-0-0-12/<p>Maple IDE 0.0.12 is now available for your pleasure.</p> <ul> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.12-windowsxp32.zip">Windows XP (32-bit)</a></li> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.12-linux32.tgz">Linux (32-bit)</a></li> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.12-macosx-10_6.dmg">Mac OS X Snow Leopard</a></li> </ul> <h2>Changelog</h2> <h3>New Stuff</h3> <ul> <li>Support for <a href="http://leaflabs.com/docs/hardware/maple-native-beta.html">Maple Native Beta</a>. The Native's SRAM chip is turned on and accessible by default.</li> <li>Dynamic memory allocation working on all boards.</li> <li><a href="https://github.com/leaflabs/libmaple/tree/master/libraries/FreeRTOS">FreeRTOS support.</a></li> <li><a href="http://leaflabs.com/docs/lang/api/hardwarespi.html#lang-hardwarespi">HardwareSPI:</a> pin accessor functions nssPin(), mosiPin(), misoPin(), and sckPin() added.</li> <li>Vastly improved documentation for the low-level <a href="http://leaflabs.com/docs/libmaple.html">libmaple</a> library.</li> </ul> <h3>Bugfixes</h3> <ul> <li><a href="http://leaflabs.com/docs/lang/api/hardwaretimer.html#lang-hardwaretimer">HardwareTimer::setPeriod()</a> fixed (broken due to a typo in the last release).</li> <li>Various fixes to low-level timer support in <a href="http://leaflabs.com/docs/libmaple/api/timer.html">timer.c</a>.</li> <li>RAM builds working again on all boards. (RAM builds were broken on the RET6 boards, see the relevant forum thread <a href="http://forums.leaflabs.com/topic.php?id=867#post-5251">here.</a></li> </ul> <h3>Miscellaneous</h3> <ul> <li><a href="http://leaflabs.com/docs/libmaple/api/stm32.html">stm32.h</a> expanded (and its declarations are more respected elsewhere in the codebase). This makes libmaple more portable to more ST chips.</li> <li>Optimized <a href="http://leaflabs.com/docs/external-interrupts.html?highlight=exti">EXTI</a> and timer IRQ handlers.</li> <li><a href="https://github.com/leaflabs">Git</a> tags have gone back to "vX.Y.Z" naming conventions, so "v0.0.12-maintenance" isntead of "0.0.12-maintenance". This seems to be more common practice, and it's what we used to do. The old branches and tags will still be around, but we'll keep using the new conventions from now on.</li> </ul> <h3>Command line toolchain</h3> <ul> <li>Library folders are added to the include path, so they can be included directly.</li> <li>Documentation sources were removed and broken out into their own <a href="https://github.com/leaflabs/leaflabs-docs">repository.</a></li> <li>New examples added, others improved.</li> </ul> <h3>Deprecations</h3> <ul> <li><a href="http://leaflabs.com/docs/libmaple/api/usart.html">usart.h</a> rx_buf field in struct usart_dev is deprecated.<br> The pointer is accessible via the rb field, so rx_buf is redundant. Having it at all implies that sizeof(struct usart_dev) is not a compile-time constant, which is undesirable. It also makes it impossible to dynamically allocate or reassign the buffer used by the rb field. This field will be removed in the next release.</li> <li><a href="http://leaflabs.com/docs/libmaple/api/stm32.html">stm32.h</a> PCLK1, PCLK2, and NR_INTERRUPTS are deprecated. Use STM32_PCLK1, STM32_PCLK2, and STM32_NR_INTERRUPTS, respectively, instead.</li> </ul> <p>Give it a test drive and let us know how it goes!</p>jessbWed, 14 Sep 2011 06:23:00 +0000tag:leaflabs.com,2011-09-14:/2011/09/maple-ide-0-0-12/Maple Native Arriveth!http://leaflabs.com//2011/09/maple-native-arriveth/<p>The long wait is over! <a href="http://leaflabs.com/store/">Maple Native's beta release is on sale!</a> Hurray!</p> <p><img src="/static/images/old/2011/09/native-beta-front-600x364.png" style="display: block; width: 600px; clear: both; margin: 0 auto;"/></p> <div style="text-align: center; clear: both;"> <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="CN8MKPG4VMXH8"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <h4 style="color: green; clear: both;">$74.99</h4> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> </div> <h3>Specifications</h3> <div> <ul> <li>MCU: <a href="http://www.st.com/internet/mcu/product/164495.jsp">STM32F103ZET6</a>, a 32-bit ARM Cortex M3 microprocessor.</li> <li>Clock Speed: <strong>72 MHz</strong></li> <li><strong>512 KB Flash</strong>, <strong>64 KB SRAM</strong> (on-chip), <strong>1 MB SRAM</strong> (external)</li> <li>106 <strong>GPIOs</strong></li> <li>17 <strong>PWM</strong> pins, at 16 bit resolution</li> <li>21 <strong>ADC</strong> pins, at 12-bit resolution</li> <li>3 <strong>SPI</strong> peripherals</li> <li>2 <strong>I2C</strong> peripherals</li> <li>12 Channels of direct memory access (<strong>DMA</strong>), with 2 DMA controllers</li> <li>3 <strong>USARTs</strong> (serial port), 2 <strong>UARTs</strong></li> <li>2 advanced, 4 general-purpose, and 2 basic <strong>timers</strong></li> <li>Dedicated <strong>USB</strong> port for programming and communications</li> <li>Dimensions: 4″ × 2.1″</li> </ul> </div> <h3>Why is this a Beta?</h3> <p>Experience has (finally) taught us that finalizing the design of a new board <a href="http://leaflabs.com/docs/hardware/maple.html#maple-identify-rev">might take a couple of tries</a>. Thus, rather than trumpeting this design's utter perfection (from the rooftops or otherwise), we're going to give ourselves a little wiggle room. That is to say, maybe we'll move some pins around between now and the final version, like we did on Maple rev 5. Maybe we'll mess with the silkscreen. Maybe we'll fix a couple of bugs. Nothing major; just wiggles.</p> <p>In addition to that, there are still some software issues which we're working out before we declare this battle station fully operational. In particular, we're working on making the 1 MB of external SRAM as easy to use as possible. Technical details for the curious after the jump. <!--more--></p> <p>As of version 0.0.11, <a href="/docs/libmaple.html">libmaple</a> doesn't deal very well with dynamic memory allocation. This has never been much of a problem before, since even the <a href="/store/#Maple-RET6">Maple RET6 Edition</a> only has 64 KB of SRAM, so static allocation is usually sufficient. With a full megabyte of RAM, however, the story is different. A recent <a href="https://github.com/leaflabs/libmaple/commit/8b9a3f4e7a685480f75da19df1b5ef1adeaad982">series</a> <a href="https://github.com/leaflabs/libmaple/commit/aa4f3b6645a17c98aa4679323208ed8636ba89b1">of</a> <a href="https://github.com/leaflabs/libmaple/commit/3c0a3ee2516e6709484a922b8298c84eccf87490">commits</a> in libmaple has fixed dynamic memory allocation, but the heap is still on the internal SRAM. That's not so great; we expect many (most?) users will want the heap in external memory, so they can e.g. allocate large buffers for audio or image processing.</p> <p>To resolve this issue, we're putting together some additional linker scripts for the Maple Native, which will transparently put the heap on the SRAM chip. Using these scripts, <tt>malloc()</tt> and friends will return pointers into external SRAM.</p> <p>This might not suit everyone's purposes, for two reasons. First, the external chip is slower. Second, using it grabs a huge number of GPIOs on the triple header at the right hand side of the board. For this reason, the traditional "RAM" and "Flash" builds you're used to are still available. These keep the heap on internal SRAM, allowing you to use the extra GPIOs for your own purposes.</p> <p>Stay tuned for more on this and other updates!</p>mbolivarFri, 09 Sep 2011 09:57:00 +0000tag:leaflabs.com,2011-09-09:/2011/09/maple-native-arriveth/Maple Native Comethhttp://leaflabs.com//2011/09/maple-native-cometh/<p>Maple Native Betas will be going on sale tomorrow morning at around this time (10:30 am EST). This is a limited run of one hundred boards, so act quickly if you're desperate for one. See you all tomorrow!</p>jessbThu, 08 Sep 2011 09:36:00 +0000tag:leaflabs.com,2011-09-08:/2011/09/maple-native-cometh/Maple Power Issueshttp://leaflabs.com//2011/08/maple-power-issues/<p>In the past couple of months we've been contacted by a few users who have had problems with the power circuitry on Maple, which has led to the discovery of a couple of issues we wanted to make sure everybody was aware of.</p> <p>First, this has been corrected in the docs and errata for awhile but we didn't have a blog post about it: although the silkscreen on Maple, Maple RET6, and Maple Mini indicates that you should be able to power the board at up to 18V, this is incorrect. The voltage regulators are rated only up to 16V; our tests indicate that they start behaving incorrectly at anything about 12V, even at low current loads, so this is recommended as the maximum voltage input for the board.</p> <p>In addition, while the maximum continuous output current for the board is 250mA, if you are powering the board off higher voltages the amount off current it can supply goes down, due to the regulators needing to dissipate the extra power. So if you are powering the board off 12V, the max current is about 40mA at room temperature. In general (again, at room temperature) the max power dissipation (PD) for the chip is about .37W, and output current = PD/(Vin-Vout). For exact max current calculations, consult the data sheet <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/22049a.pdf">here</a> (PDF warning).</p> <p>Last, and probably most serious, we've found that on several batches of Maples, one of the conditioning capacitors used was not up to the proper voltage rating. (Please note that this effects only Maples and RET6s, not Maple Mini.) The capacitor C11 should have been rated to 16V; instead, it's only rated to 6V. This is a particularly devious problem since capacitors can be over-voltaged for a long time before failing. If you power your board exclusively from sources less than 6V (for example, USB is fine), you're probably okay. But if you routinely power your board from greater than 6V, you risk eventually blowing this cap and shorting the board. This likely won't happen immediately -- we've been testing boards continuously at 12V for over a week now with no ill effects -- but in general, "it ought not to be attempted."</p> <p>Probably the easiest fix for this problem is to simply remove C11, and in fact, for the foreseeable future we will be shipping Maples with C11 taken off. This picture indicates the appropriate capacitor to be removed with a yellow X:</p> <p><img alt="Maple with C11 indicated" src="/static/images/old/2011/08/maple-c112-295x300.png" title="maple-c11" /></p> <p>C11 is in the upper left quadrant of the board, the bottom in a column of six passives right to the left of the power selection header. If you need to power your board at over 6V and don't have the ability to remove the capacitor yourself, please get in touch with us and we will work something out.</p> <p>We truly apologize for any trouble or confusion this may have caused! Obviously, if these issues have caused catastrophic board failure for anybody, we are more than happy to replace or refund your board. Please feel free to contact us with any questions or concerns at info@leaflabs.com.</p>jessbFri, 12 Aug 2011 13:27:00 +0000tag:leaflabs.com,2011-08-12:/2011/08/maple-power-issues/One hundred Maple Minis out the door!http://leaflabs.com//2011/06/one-hundred-maple-minis-out-the-door/<p>That's the lot of 'em, guys. Thanks so much for the super-successful sale. Of course, you can <a href="http://leaflabs.com/store/">still buy Mini</a> at the usual price of $34.99. Can't wait to see what everybody does with them.</p>jessbTue, 07 Jun 2011 13:05:00 +0000tag:leaflabs.com,2011-06-07:/2011/06/one-hundred-maple-minis-out-the-door/Love is a Mini-Splendored Thinghttp://leaflabs.com//2011/06/love-is-a-mini-splendored-thing/<p>Good news, everyone! The first batch of Maple Minis have arrived, and we've released <a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.11/maple-ide-install.html">Maple IDE 0.0.11</a> to officially support them!</p> <p><center> <img alt="farnsworth" src="/static/images/old/2011/05/farnsworth-234x300.jpg" title="farnsworth" /> </center></p> <p>While we've got a whole bundle of them on the way, the first hundred boards came early (long story). To celebrate, we're going to be <strong><a href="/store/">selling these first hundred at the low low price of $24.99</a></strong>, $10 off the usual price ($34.99 for those of us who are bad at math). So hurry to the <a href="http://leaflabs.com/store/">store</a> and get yours right away!</p> <p>If you're new to LeafLabs and this is the first you're hearing about the Mini, head to the <a href="/devices/#Maple-Mini">devices page</a> for more information. (The <a href="http://leaflabs.com/docs/hardware/maple-mini.html">Mini's hardware docs page</a> has all the gory details). Don't forget, you'll need to grab the <a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.11/maple-ide-install.html">0.0.11 IDE</a> in order to play with the Mini.</p> <p><center> <a href="/static/images/old/2011/05/DSC_0034.jpeg" title="DSC_0034"> <img width="150" height="150" src="/static/images/old/2011/05/DSC_0034-150x150.jpg" class="attachment-thumbnail" alt="" title="DSC_0034"></a> <a href="/static/images/old/2011/05/DSC_0047.jpeg" title="DSC_0047"> <img width="150" height="150" src="/static/images/old/2011/05/DSC_0047-150x150.jpg" class="attachment-thumbnail" alt="" title="DSC_0047"></a> <a href="/static/images/old/2011/05/DSC_0061.jpeg" title="DSC_0061"> <img width="150" height="150" src="/static/images/old/2011/05/DSC_0061-150x150.jpg" class="attachment-thumbnail" alt="" title="DSC_0061"></a> <a href="/static/images/old/2011/05/DSC_0064.jpeg" title="DSC_0064"> <img width="150" height="150" src="/static/images/old/2011/05/DSC_0064-150x150.jpg" class="attachment-thumbnail" alt="" title="DSC_0064"></a> </center></p>jessbWed, 01 Jun 2011 15:34:00 +0000tag:leaflabs.com,2011-06-01:/2011/06/love-is-a-mini-splendored-thing/Wiki Maintenancehttp://leaflabs.com//2011/06/wiki-maintenance/<p>The wiki will be down for a short time while we install new plug-ins.</p> <p><strong>Update:</strong> the wiki is back up, but we're going to defer some work on it until later.</p>drewsWed, 01 Jun 2011 11:28:00 +0000tag:leaflabs.com,2011-06-01:/2011/06/wiki-maintenance/Maple IDE 0.0.10 Releasedhttp://leaflabs.com//2011/05/maple-ide-0010-released/<p>That's right, the newest release of the Maple IDE is hot out of the oven, and ready for you to <a href="/docs/maple-ide-install.html">download</a>.</p> <p>This feature-packed release includes a ton of new stuff; see the <a href="/2011/05/maple-ret6-edition-and-maple-ide-0-0-10-beta/">0.0.10 Beta post</a> for all the juicy details.</p> <p>Finally, a quick note: there were a few last-minute tweaks we made to the lowest-level layers of <a href="/docs/libmaple.html">libmaple</a> which advanced users of the 0.0.10 Beta may want to take a look at; more after the jump. <!--more--></p> <p>Now that the release is out, the public libmaple APIs are fixed. This means that every <a href="/docs/libmaple/apis.html">officially documented</a> bit of functionality in libmaple will be present for the foreseeable future, and any changes which break compatibility with these APIs are bugs. However, we did make a few minor changes in between the time the 0.0.10 beta came out and the final release.</p> <p>Again, these post-beta changes only affect the very lowest levels of the libmaple, and unless you were messing around down there, they are unlikely to affect you at all. Here's the list:</p> <ul> <li>adc.h: adc_init() no longer blindly assumes you want RCC_ADCPRE_PCLK_DIV_6; the caller is responsible for setting the prescaler now, which we do at init() time.</li> <li>gpio.h: AFIORemapPeripheral was renamed afio_remap_peripheral, and several of its enumerators changed. The previous definition did not allow for all possible remaps. </li> <li><div>i2c.h: There were a few changes to struct i2c_dev's members: <ol><li>"volatile uint8 state" became "volatile i2c_state state"</li> <li>"uint8 clk_line" became "rcc_clk_id clk_id"</li> <li>"uint8 ev_nvic_line" became "nvic_irq_num ev_nvic_line"</li> <li>"uint8 er_nvic_line" became "nvic_irq_num er_nvic_line"</li> </ol> Additionally, i2c_init() was made public.</div> </li> <li>rcc.h:The various XXX_prescaler_divider enums used as arguments to rcc_set_prescaler() were badly named. They have been renamed as follows: <ol> <li>adc_prescaler_divider became rcc_adc_divider</li> <li>apb1_prescaler_divider became rcc_apb1_divider</li> <li>apb2_prescaler_divider became rcc_apb2_divider</li> <li>ahb_prescaler_divider became rcc_ahb_divider</li> </ol> </li> <li><div>timer.h: timer_reg_map_union became timer_reg_map. Additionally, various unbearably long names were shortened: <ol> <li>timer_enable_interrupt() became timer_enable_irq()</li> <li>timer_disable_interrupt() became timer_disable_irq()</li> <li>timer_cc_get_polarity() became timer_cc_get_pol()</li> <li>timer_cc_set_polarity() became timer_cc_set_pol()</li> <li>timer_trigger_dma_enable_request() became timer_dma_enable_trg_req()</li> <li>timer_trigger_dma_disable_request() became timer_dma_disable_trg_req()</li> <li>timer_dma_enable_request() became timer_dma_enable_req()</li> <li>timer_dma_disable_request() became timer_dma_disable_req()</li> <li>timer_get_dma_burst_length() became timer_dma_get_burst_len()</li> <li>timer_set_dma_burst_length() became timer_dma_set_burst_len()</li> <li>timer_get_dma_base_address() became timer_dma_get_base_addr()</li> <li>timer_dma_base_address became timer_dma_base_addr</li> <li>timer_set_dma_base_address() became timer_dma_set_base_addr()</li> </ol> </div> </li> </ul>mbolivarMon, 23 May 2011 15:52:00 +0000tag:leaflabs.com,2011-05-23:/2011/05/maple-ide-0010-released/Maple now on Sparkfun!http://leaflabs.com//2011/05/maple-now-on-sparkfun/<p><strong>Check out the <a href="http://www.sparkfun.com/news/616">promo video</a></strong></p> <p><a href="http://leaflabs.com/2011/05/maple-now-on-sparkfun/sparkfun-launch/" rel="attachment wp-att-2059"><img src="/static/images/old/2011/05/sparkfun-launch-501x600.png" alt="" title="sparkfun-launch" width="501" height="600" class="aligncenter size-large wp-image-2059" /></a></p> <p>Over the past year, we have been accumulating a strong list of distributors. Today we are very excited to add <a href="http://sparkfun.com">SparkFun</a> (US) and <a href="http://www.watterott.com">Watterott Electronic</a> (Germany) to this group!</p> <p><a href="http://www.watterott.com"><img src="/static/images/old/2011/05/logo-e1305819359235.jpg" alt="" title="watterott-logo" width="309" height="80" class="aligncenter size-full wp-image-2056" /></a></p> <p>We have tried our best to choose our distributors carefully and get a good distribution around the globe, so you may want to check out our <a href="http://leaflabs.com/distributors/">distributors</a> page to find your favorite online depot or discover a distributor in your region (and save on those VAT taxes!)</p>poslathianFri, 20 May 2011 16:00:00 +0000tag:leaflabs.com,2011-05-20:/2011/05/maple-now-on-sparkfun/Maple RET6 Edition and Maple IDE 0.0.10 Betahttp://leaflabs.com//2011/05/maple-ret6-edition-and-maple-ide-0-0-10-beta/<p>Some great pieces of news: <ul> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/maple-ide-install.html">Maple IDE 0.0.10 Beta is out!</a></li> <li><a href="/store">Headerless Maples and the Maple RET6 Edition are on sale!</a></li> </ul></p> <p>One of our goals with <a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/libmaple.html">libmaple</a> and the Maple IDE is to support ST's rather extensive line of 32 bit Cortex M3 processors. Towards this end, and with the community's input, libmaple has been completely refactored over the past few months. This work is finally ready for <a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/maple-ide-install.html">a beta release</a>!</p> <p>To demonstrate libmaple's newfound flexibility, we have also decided to put a new board on sale, the <a href="http://leaflabs.com/devices/">Maple RET6 Edition</a>. This more powerful processor has over 3 times the RAM and 4 times the Flash memory than the processor on the Maple. Thanks to the refactor effort, we were able to easily add support for this new chip into the Maple IDE. We are only making a limited number of these Maple RET6 Edition boards, so <a href="http://leaflabs.com/store">go buy one!</a> More info after the jump. <!--more--></p> <p>The Maple is based around the STM32F103RBT6 ("RBT6") processor. This processor is what gives Maple 20KB RAM, 128KB Flash, and all the great peripherals you are (by now) used to using. There is another chip, however, that will likely one day take the RBT6's place: the STM32F103RET6 ("RET6"). The RET6 has over 3 times the RAM (64KB), 4 times the Flash memory (512KB), and many additional peripherals (like DACs!) not present on the RBT6. </p> <p>We haven't yet made a new Maple board based around the RET6. However, the RET6 is completely pin compatible with the older RBT6, so we have produced a limited run of boards where in place of the RBT6, we have substituted the RET6 processor. The accompanying IDE 0.0.10 beta release includes support for this new Maple RET6 Edition.</p> <p>But that's not all that's new, not by a long shot. A lot has happened since 0.0.9 came out. The most important change is the bottom-up <a href='http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/libmaple.html'>refactoring and documentation</a> of the low-level <a href='https://github.com/leaflabs/libmaple/'>libmaple</a> library. However, there have been a variety of other changes; a detailed changelog follows.</p> <p>Try it out and let us know how it goes:</p> <ul> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.10beta-linux32.tgz">Linux 32-bit</a></li> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.10beta-macosx-10_6.dmg">OS X Snow Leopard</a></li> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.10beta-windowsxp32.zip">Windows XP (32-bit)</a></li> </ul> <p>If you have any problems, let us know in the <a href="http://forums.leaflabs.com">forum</a>. Once we've finished a <a href="http://wiki.leaflabs.com/index.php?title=Blocking_Changes">few more odds and ends</a>, well put the official release out there.</p> <h2>Changelog</h2> <h3>Maple IDE</h3> <ul> <li>Support for Maple RET6 Edition</li> <li>Various keyword highlighting additions to reflect changes to libmaple.</li> </ul> <h3>Wirish</h3> <ul> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/libs/servo.html">Servo library</a> <ul> <li>Servo::attach() made more flexible. It now optionally takes a minimum and maximum target angle, with negative values allowed. This allows, for example, making the midpoint of the pulse width interval correspond to 0 degrees, and the minimum and maximum correspond to -90 and 90 degrees, respectively. This is a backwards-compatible and Arduino-compatible change.</li> <li>Servo::attached() bugfix</li> <li>Servo::write() now only takes an angle (large values are not treated as pulse widths). This breaks compatibility with the previous release and an undocumented Arduino misfeature.</li> <li>New method: Servo::attachedPin()</li> </ul> </li> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/libraries.html#id2">LiquidCrystal</a> library: speed optimizations; should run significantly faster now. </li> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/lang/api/shiftout.html">shiftOut()</a>: Exposed and documented. </li> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/lang/api/serialusb.html">SerialUSB</a>: increased reliability, but there's still work to do here. </li> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/lang/api/disabledebugports.html">disableDebugPorts()</a> and <a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/lang/api/enabledebugports.html">enableDebugPorts()</a>: used respectively to disable and enable the built-in Cortex M3 <a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/jtag.html">JTAG</a> and Serial Wire Debug hardware peripherals. This increases the number of available GPIOs on the Maple by five (up to 44!). </li> <li>A variety of board-specific values were introduced; see <a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/lang/api/board-values.html">associated documentation</a>; also see Examples > Maple > InteractiveTest for example usage. </li> <li>Maple RET6 Edition support</li> <li><p>Bug fixes when printing 64-bit integer types and doubles.</p> <p>Our Print implementation was borrowed from Arduino, where long is the largest integral type. On the STM32, however, a long occupies 4 bytes, while a long long occupies 8. Thus, eight byte integers were not printed correctly. This issue has been fixed.</p> <p>The previous implementation also behaved very badly where doubles with large absolute value were concerned. For example, numeric_limits&lt;double&gt;::max() (which is approximately 1.7 * 10^38) was printing as -1.21474836472147483647! We've changed the behavior so that these sorts of values print as "&lt;large double&gt;" and "-&lt;large double&gt;". This will cause host-PC side parsers to crash or report errors, rather than silently process incorrect values.</p> </li> <li><p><a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/lang/api/hardwaretimer.html">HardwareTimer</a>: Changes were made which break compatibility with 0.0.9. In particular, because of changes made to the low-level timer library, the timer_dev_num type and the getTimer() function no longer exist. Be very careful when converting old timer code that used either one of these, as, for example, <tt>TIMER1</tt> means something very different now than it did in 0.0.9.</p> <p>Many other methods were also deprecated; however, their functionality has been taken over by other ones. The HardwareTimer interface is still not finished, and should be considered experimental until further notice.</p> </li> <li><a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/lang/api/hardwarespi.html#lang-hardwarespi">HardwareSPI</a>: Slave mode support! Additionally, some old functions were deprecated, with better ones taking over their functionality. </li> </ul> <h3>libmaple Proper</h3> <ul> <li><a href="https://github.com/leaflabs/libmaple">libmaple</a> has been completely refactored. Its interfaces are now <a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/libmaple/apis.html">officially documented</a> (though the best documentation is still currently in the source code) and stable. Any future changes which break backwards compatibility will go through a deprecation period first. </li> <li><em>New</em>: Support for the following peripherals and processor features: <ul> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/i2c.h">i2c.h</a> Inter-Integrated Circuit (I2C)</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/dma.h">dma.h</a> Direct Memory Access (DMA) (initial implementation by Michael Hope)</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/dac.h">dac.h</a> Digital-to-Analog converter (DAC)</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/iwdg.h">iwdg.h</a> Independent watchdog (IWDG) (initial implementation by Michael Hope)</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/bkp.h">bkp.h</a> Backup registers (BKP)</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/pwr.h">pwr.h</a> Power domain (PWR)</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/fsmc.h">fsmc.h</a> Flexible Static Memory Controller (FSMC)</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/scb.h">scb.h</a> System Control Block (SCB)</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/bitband.h">bitband.h</a> better interface for functionality previously in util.h</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/stm32.h">stm32.h</a> future basis for MCU-specific configuration</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/delay.h">delay.h</a> base delay_us() implementation, pulled from Wirish.</li> </ul> <p></li> <li>Other changes: <ul> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/ring_buffer.h">ring_buffer.h</a>: the previous implementation had many problems, and was rewritten. Thanks to Michael Hope (<a href="https://github.com/nzmichaelh" >nzmichaelh on GitHub</a>) for the initial rewrite.</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/systick.h">systick.h</a> systick_resume() renamed systick_enable()</li> <li><a href="https://github.com/leaflabs/libmaple/blob/0.0.10beta/libmaple/util.h">util.h</a> register read/write macros (__read(), __write(), etc.) were removed.</li> </ul> </li> </ul></p> <h3>Other</h3> <p><a href="http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.10beta/unix-toolchain.html">Unix toolchain</a> compiler output: more debug symbols; map file generation.</p>mbolivarThu, 12 May 2011 19:52:00 +0000tag:leaflabs.com,2011-05-12:/2011/05/maple-ret6-edition-and-maple-ide-0-0-10-beta/Forum Roundup Ihttp://leaflabs.com//2011/04/forum-roundup-i/<p>A couple of days ago, our <a href="http://forums.leaflabs.com">thriving forums</a> hit <a href="http://forums.leaflabs.com/topic.php?id=727">4000 posts</a>. We thought that was pretty cool, and we also thought that with the forums moving so quickly these days, it could be easy to miss something really exciting. To help you avoid that tragedy, we've decided to start doing Forum Roundups, bringing you all the highlights from the previous week's forum chatter. Here's some of the fun stuff that's been happening in the past week.</p> <ul> <li><a href="http://forums.leaflabs.com/topic.php?id=698">Brushless DC motor drivers</a> using Maple. <a href="http://forums.leaflabs.com/profile.php?id=756">crenn</a> is working on twin-bladed vertical take-off and landing for a class project. You can see a video of the motor being driven <a href="http://www.youtube.com/watch?v=3x7gr2RLp4M">here.</a></li> <li><a href="http://forums.leaflabs.com/profile.php?id=2518">Silntknight</a> is using a Maple to control the valves on a Briggs &amp; Stratton 3.5 HP engine. There's a detailed and fascinating discussion of the power electronics involved in <a href="http://forums.leaflabs.com/topic.php?id=719">this thread.</a></li> <li><a href="http://forums.leaflabs.com/profile.php?id=3675">anton</a> and <a href="http://forums.leaflabs.com/profile.php?id=3696">ridgebackred</a> work to get the Maple IDE working with the <a href="http://forums.leaflabs.com/topic.php?id=630">STM32 Discovery board.</a> (Of course we'd rather you buy a Maple...!) You can check out their work <a href="http://github.com/anton19286/libmaple/tree/discovery">here</a> on github.</li> <li>Design files for a <a href="http://forums.leaflabs.com/topic.php?id=712">Maple protoshield board</a> from <a href="http://forums.leaflabs.com/profile.php?id=386">Adam</a>. Sounds like the boards have been sent off to fab... can't wait to see how they turn out.</li> <li>Buried <a href="http://forums.leaflabs.com/topic.php?id=542&amp;page=5">deep in a thread</a> about Minis (and a whole bunch of other stuff), <a href="http://forums.leaflabs.com/profile.php?id=292">gbulmer</a> reveals a Maple-influenced robot controller board he's been working on (thought you could sneak it by us, huh?). You can read his blog post about it <a href="http://ourduino.wordpress.com/2011/04/06/orone-cortex-m3-robot-controller-stm32f103/">here.</a> Very cool.</li> <li>From <a href="http://forums.leaflabs.com/profile.php?id=843">StephenFromNYC</a>, USB Observations Parts <a href="http://forums.leaflabs.com/topic.php?id=685">I</a>, <a href="http://forums.leaflabs.com/topic.php?id=688">II</a>, and <a href="http://forums.leaflabs.com/topic.php?id=692">III.</a> (More than a week old, but worth the read.)</li> <li>Much more than a week old, but too cool to not include: <a href="http://forums.leaflabs.com/profile.php?id=3672">Xavier's</a> <a href="http://forums.leaflabs.com/topic.php?id=665">FM synth</a> project. You can hear it in action <a href="http://xhosxe.free.fr/IxoxFMSynth.mp3">here.</a></li> </ul> <p>And that's it for this week's roundup. Did we miss something awesome? Let us know in the comments.</p> <div id="attachment_1906" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-1906" href="http://leaflabs.com/2011/04/forum-roundup-i/crenn-vtol2/" ><img class="size-medium wp-image-1906 " title="Crenn's Maple+Xbee+IMU" src="/static/images/old/2011/04/crenn-vtol2-300x168.jpg" alt="" width="300" height="168" /></a><p class="wp-caption-text">Crenn&#39;s Maple+Xbee+IMU</p></div> <div id="attachment_1903" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-1903" href="http://leaflabs.com/2011/04/forum-roundup-i/xavier-synth1/" ><img class="size-medium wp-image-1903 " title="Xavier's FM Synth" src="/static/images/old/2011/04/xavier-synth1-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Xavier&#39;s FM Synth</p></div> <div id="attachment_1908" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-1908" href="http://leaflabs.com/2011/04/forum-roundup-i/adam-protoshield1/" ><img class="size-medium wp-image-1908 " title="Adam's new Maple Protoshield" src="/static/images/old/2011/04/adam-protoshield1-300x252.png" alt="" width="300" height="252" /></a><p class="wp-caption-text">Adam&#39;s new Maple Protoshield</p></div>jessbMon, 11 Apr 2011 18:55:00 +0000tag:leaflabs.com,2011-04-11:/2011/04/forum-roundup-i/Maple restock and Maple Mini statushttp://leaflabs.com//2011/04/maple-restock-and-maple-mini-status/<p>We've been receiving lots of emails and forum posts asking about when we'll have new Maples in stock, and when the Maple Mini will be out. So far, we've just been responding "as soon as we can get them to you!"; here are some more details on why there have been delays.</p> <p>Regarding the Maple, we received word from our manufacturer over the weekend that the yield rate on the new Maple runs was unacceptably low. The failure rate was traced down to bad button connections. We're working with them as much as possible to discover how the problem arose, and how to prevent it in the future.</p> <p>The first batch of Maple Minis has been manufactured, but it's taken a little longer than we anticipated to get the test procedure up, running, and streamlined. These issues were resolved with changes to our testing documentation, and a generalized "test session" program (which was made public in <a href="https://github.com/leaflabs/libmaple/commit/6cf31789965b87efe9c51c9b1acc91c7cc9cb463">this libmaple commit</a>).  This revised test program should be sufficient to accommodate all future Maple-style boards. To the best of our knowledge, the Minis are currently undergoing testing at the manufacturer.</p> <p>We will continue to keep you updated with any news as it arrives.  Thanks to everyone for your patience!</p>mbolivarMon, 04 Apr 2011 16:32:00 +0000tag:leaflabs.com,2011-04-04:/2011/04/maple-restock-and-maple-mini-status/For Want of a Macro Lens (and Maple Mini!)http://leaflabs.com//2011/03/for-want-of-a-macro-lens-and-maple-mini/<p>Soon, someone with more equipment (and certainly more talent) than I have will replace these pictures with some real photos. But, a <em>few</em> Maple Mini's came back from fab today and I just couldn't help myself. I only had two lenses, a 500mm telephoto and some other zoom lens (200mm?) - point being I had to take these while standing about 6 feet away. Enjoy the day's eye candy!</p> <p><center> <table style="border-style: none;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td><a href="http://leaflabs.com/?attachment_id=1836"><img class="size-medium wp-image-1836 alignnone" title="IMG_3562.resized" src="/static/images/old/2011/03/IMG_3562.resized-300x200.jpg" alt="" width="300" height="200" /></a></td> <td><a href="http://leaflabs.com/?attachment_id=1835"><img class="size-medium wp-image-1835 alignnone" title="IMG_3558.resized" src="/static/images/old/2011/03/IMG_3558.resized-300x200.jpg" alt="" width="300" height="200" /></a></td> </tr> <tr> <td><a href="http://leaflabs.com/?attachment_id=1834"><img class="size-medium wp-image-1834 alignnone" title="IMG_3533.resized" src="/static/images/old/2011/03/IMG_3533.resized-300x200.jpg" alt="" width="300" height="200" /></a></td> <td><a href="http://leaflabs.com/?attachment_id=1832"><img class="size-medium wp-image-1832 alignnone" title="front-clear" src="/static/images/old/2011/03/front-clear-300x199.jpg" alt="" width="300" height="199" /></a></td> </tr> <tr> <td><a href="http://leaflabs.com/?attachment_id=1833"><img class="size-medium wp-image-1833 alignnone" title="back-clear" src="/static/images/old/2011/03/IMG_3529.resized-300x200.jpg" alt="" width="300" height="200" /></a></td> <td><a href="http://leaflabs.com/?attachment_id=1831"><img class="size-medium wp-image-1831 alignnone" title="back-clear" src="/static/images/old/2011/03/back-clear-300x199.jpg" alt="" width="300" height="199" /></a></td> </tr> </tbody> </table> </center></p>poslathianTue, 01 Mar 2011 13:16:00 +0000tag:leaflabs.com,2011-03-01:/2011/03/for-want-of-a-macro-lens-and-maple-mini/Maple Mini is off to fab!http://leaflabs.com//2011/02/maple-mini-is-off-to-fab/<p>Our Maple Mini prototypes have passed our internal testing, so we've sent the current design off for production. This means they'll be up for sale as soon as they're manufactured. We're excited about getting Mini into your hands, and will be sure to update when they're up for sale!</p>mbolivarTue, 08 Feb 2011 05:27:00 +0000tag:leaflabs.com,2011-02-08:/2011/02/maple-mini-is-off-to-fab/New Maple Mini and Maple Native prototypes!http://leaflabs.com//2011/01/new-maple-mini-and-maple-native-prototypes/<p>New Maple Mini and Maple Native prototypes are in!  So far, we've ported the <a href="http://leaflabs.com/docs/bootloader.html">bootloader</a> to each new board, and have completed the initial Maple Mini <a href="http://leaflabs.com/docs/libmaple.html">libmaple</a> port.</p> <p>Maple Mini's silkscreen has been entirely redone, making it much easier to program without having to constantly refer to schematics or data sheet tables.  Here's the top view:</p> <p><a href="/static/images/old/2011/01/mini-r2-top.jpg"><img class="aligncenter size-medium wp-image-1805" title="mini-r2-top" src="/static/images/old/2011/01/mini-r2-top-300x237.png" alt="Maple Mini r2, top view" width="300" height="237" /></a></p> <p>The bottom view reveals where the components are:</p> <p><a href="/static/images/old/2011/01/mini-r2-bottom.jpg"><img class="aligncenter size-medium wp-image-1804" title="mini-r2-bottom" src="/static/images/old/2011/01/mini-r2-bottom-300x225.png" alt="Maple Mini r2, bottom view" width="300" height="225" /></a></p> <p>Finally, a shot of Maple Native: <p style="text-align: left;"><a href="/static/images/old/2011/01/native-r2.jpg"><img class="aligncenter" title="native-r2" src="/static/images/old/2011/01/native-r2-300x166.jpg" alt="Maple Native r2" width="300" height="166" /></a></p></p>mbolivarMon, 31 Jan 2011 05:31:00 +0000tag:leaflabs.com,2011-01-31:/2011/01/new-maple-mini-and-maple-native-prototypes/LeafLabs wiki launchedhttp://leaflabs.com//2010/12/wiki-launched/<p>We've just launched our own wiki at <a href="http://wiki.leaflabs.com">http://wiki.leaflabs.com</a>. The decision was brought about because of <a href="http://forums.leaflabs.com/topic.php?id=576#post-3147">a thread on our forums in support of a wiki</a> for everyone to contribute to. <strong>Well...we think its a good idea too!</strong></p> <p>We'd like to invite everyone interested to <a href="http://wiki.leaflabs.com/index.php?title=Special:UserLogin&amp;type=signup&amp;returnto=Main_Page">register at our new wiki</a> and contribute their experiences. It's a free-for-all at the moment, but we may nominate a few of our more helpful community members to be moderators in the near future.</p> <p>Thank you for the feedback, and remember to <em>edit responsibly</em>.</p>drewsThu, 23 Dec 2010 22:00:00 +0000tag:leaflabs.com,2010-12-23:/2010/12/wiki-launched/MapleIDE 0.0.9 Released!http://leaflabs.com//2010/12/mapleide-0-0-9-released/<p>Hey all,</p> <p><a href="http://leaflabs.com/docs/maple-ide-install.html">Maple IDE 0.0.9</a> just came out. Here's a changelog:</p> <ul> <li>Revamped <a href="http://leaflabs.com/docs/">documentation</a></li> <li>Ports for more Arduino core language functions: <a href="http://leaflabs.com/docs/lang/api/interrupts.html">interrupts()</a>, <a href="http://leaflabs.com/docs/lang/api/nointerrupts.html">noInterrupts()</a></li> <li>Added single-byte "B10110011" style defines, for Arduino compatibility</li> <li>New core language functions: <a href="http://leaflabs.com/docs/lang/api/toggleled.html">toggleLED()</a>, <a href="http://leaflabs.com/docs/lang/api/togglepin.html">togglePin()</a>, <a href="http://leaflabs.com/docs/lang/api/isbuttonpressed.html">isButtonPressed()</a>, <a href="http://leaflabs.com/docs/lang/api/waitforbuttonpress.html">waitForButtonPress()</a></li> <li>New <a href="http://leaflabs.com/docs/lang/api/hardwaretimer.html">timer</a> methods</li> <li><a href="http://leaflabs.com/docs/libraries.html#servo">Servo</a> library</li> <li>A community-contributed library for <a href="http://akb77.com/g/mcu/maple-eeprom-emulation-library/">EEPROM emulation</a> (thanks, <a href="http://forums.leaflabs.com/profile.php?id=259">x893</a>!)</li> </ul> <p>Additionally, we've added support in <a href="http://github.com/leaflabs/libmaple">libmaple</a> for the Maple Mini.</p> <p>We're also releasing an alpha port of the WiShield library at:</p> <p><a href="http://static.leaflabs.com/pub/leaflabs/labs/WiShield.zip">http://static.leaflabs.com/pub/leaflabs/labs/WiShield.zip</a></p> <p>[That link will move once the port is more advanced]. It's not feature-complete, and is still buggy, but is capable of connecting to an access point and serving a web page.</p> <p>With this release out, our immediate bug targets on the software front are the <a href="http://code.google.com/p/leaflabs/issues/detail?id=8">Windows upload issue</a> and the <a href="http://code.google.com/p/leaflabs/issues/detail?id=10">SerialUSB bugs on large reads and writes</a>.  After those critical bugs are triaged, we'll release them as an incremental IDE release before resuming our normal development on the upcoming serial bootloader and IDE rewrite.</p> <p>On the hardware front, we're finalizing Maple Mini, and moving forward on Oak.  More news as it happens!</p>mbolivarThu, 16 Dec 2010 01:32:00 +0000tag:leaflabs.com,2010-12-16:/2010/12/mapleide-0-0-9-released/Maples have arrived!http://leaflabs.com//2010/11/maples-have-arrived/<p>Our shipment of Maple Rev 5s have finally arrived! We'll be shipping them out tomorrow. Thanks to everyone who ordered for your patience.</p>mbolivarSun, 28 Nov 2010 12:21:00 +0000tag:leaflabs.com,2010-11-28:/2010/11/maples-have-arrived/Still no word from DHL on Maple Rev 5http://leaflabs.com//2010/11/still-no-word-from-dhl-on-maple-rev-5/<p>Our shipment of Maples is still in transit.  Feel free to try any of the following distributors; these are known to have them in stock:</p> <ul> <li><a href="http://www.seeedstudio.com/depot/leaf-maple-cortex-m3-p-670.html">SeeedStudio</a></li> <li><a href="http://www.robotshop.com/leaflabs-maple-32-bit-arduino-compatible-microcontroller.html">RobotShop</a></li> <li><a href="http://www.lawicel-shop.se/shop/default.aspx?lng=ENG&amp;cur=SEK">Lawicel</a></li> </ul> <p>If you've already ordered from us, and would like to order from a distributor instead (or if you're just tired of waiting), just send us an <a href="mailto:payments@leaflabs.com">email</a> from the address you gave to PayPal when you ordered, and we'll issue you a full refund.</p>mbolivarWed, 24 Nov 2010 10:28:00 +0000tag:leaflabs.com,2010-11-24:/2010/11/still-no-word-from-dhl-on-maple-rev-5/Waiting on your Maple Rev5?http://leaflabs.com//2010/11/waiting-on-your-maple-rev5/<p>We're still waiting, too.</p> <p>Due to a shipping mix-up, we're still waiting on our first run of Maple rev 5's to arrive.  If you ordered a board directly from our website and still haven't received it, don't worry! Your board is on the way, and we'll get it to you as fast as we can.  We've emailed you letting you know that your order is complete, and we'll post on the blog when the new run arrives.</p>mbolivarSun, 21 Nov 2010 09:23:00 +0000tag:leaflabs.com,2010-11-21:/2010/11/waiting-on-your-maple-rev5/Maple Rev5 Now Available!http://leaflabs.com//2010/11/maple-rev5-now-available/<p>After a tense 30 day inventory gap after the complete sellout of Maple Rev3, we have finally completed the first fab run of Maple Rev5! The new design incorporates a few changes that our users have been asking for - compatibility with 1/10" spacing (meaning shields can be made out of proto-board or breadboard instead of expensive custom PCB's) on the additional header and the analog supply has been broken out on the power header for low-noise applications. Additionally, we made some improvements to the silkscreen that we think you will find useful. Testing and flashing is completed on these boards, and we will start shipping them out very shortly (~Nov. 13)! Unfortunately, much of this batch has already been purchased in volume by independent groups and distributors, leaving us only 50 boards! The good news is that we have already ordered the next batch, which should be about 35 days out. The bad news is that this will almost certainly mean another inventory gap, so if you want a board for Christmas this year, head over to the store page soon.</p> <p><a rel="attachment wp-att-1435" href="http://leaflabs.com/2010/11/maple-rev5-now-available/p1240903/"><img class="alignnone size-medium wp-image-1435" title="P1240903" src="/static/images/old/2010/11/P1240903-300x225.jpg" alt="" width="300" height="225" /></a><a rel="attachment wp-att-1436" href="http://leaflabs.com/2010/11/maple-rev5-now-available/p1240906/"><img class="alignnone size-medium wp-image-1436" title="P1240906" src="/static/images/old/2010/11/P1240906-300x225.jpg" alt="" width="300" height="225" /></a><a rel="attachment wp-att-1437" href="http://leaflabs.com/2010/11/maple-rev5-now-available/p1240908/"><img class="alignnone size-medium wp-image-1437" title="P1240908" src="/static/images/old/2010/11/P1240908-300x225.jpg" alt="" width="300" height="225" /></a><a rel="attachment wp-att-1442" href="http://leaflabs.com/2010/11/maple-rev5-now-available/p1240905/"><img class="alignnone size-medium wp-image-1442" title="P1240905" src="/static/images/old/2010/11/P1240905-300x225.jpg" alt="" width="300" height="225" /></a></p> <p>We have some other projects on the way to heighten brighten your holiday season even more. Maple Mini is in its final testing stages, and we will be getting the first 200 of these boards in shortly. Target price for these boards is in the $33 range, and because the first run is a pretty small one we will likely put them up for pre-order as soon as were satisfied with the production samples. Maple Native is also on its way to fab, and our programming tools have been expanded to fully support both of these new boards.</p> <p>Speaking of software tools, we've begun dog-fooding our pre-alpha version of the new IDE! Whats new about it? First off its all written in python, from the ground up. The interface is the same as what youre used to, and all our command line tools will still be available. But this new frontend is more stable, extensible, and most importantly - hackable than its java predecessor, forked from the Arduino project. My favorite new features? optional Emacs keybindings, and improved compiler and debug reporting. The serial interface is substantially improved as well.</p> <p>On the libmaple side, we're finishing up a comprehensive interface for Direct Memory Access (DMA). This core feature of the stm32 allows for data to be copied asynchronously, without incurring the performance cost of code that busies the processor by reading data from A and writing it to B. The DMA allows you to do things such as creating magic buffers that are always filled with the latest readings from the ADC, or configuring the I2C to write out a whole swath of data, whilst your program can go off and do other things. The DMA even allows for your code to copy data between two local memory buffers asynchronously. In a lot of ways, it feels like threading - but restricted to memory copy and data transfer operations.</p> <p>Because of the addition of DMA support, previously unavailable features of other peripherals will become usable. For example, hardware I2C, advanced ADC configurations, and fast asynchronous serial channels will open new opportunities for higher performance in your applications.</p> <p>We are excited to see how you put all these things to use and we're putting some tutorials together to help get you started. For example, how to drive a VGA monitor to make a pong game, how to create a 20 channel synthesizer capable of reproducing the famous THX deep note, and how to build a 44KHz 16bit in/out programmable audio effects pedal! Stay tuned!</p>poslathianFri, 05 Nov 2010 15:40:00 +0000tag:leaflabs.com,2010-11-05:/2010/11/maple-rev5-now-available/Maple Mini Prototype!http://leaflabs.com//2010/10/maple-mini-prototype/<p><a href="/static/images/old/2010/10/maplemini-top.jpg"> <img src="/static/images/old/2010/10/maplemini-top-770x510.jpg" alt="maplemini-top"> </a></p> <p>We've cooked up Maple Mini which has fewer pins but the same amount of SRAM and flash memory as the original Maple. It's breadboard compatible and smaller than a stick of gum! We hope to slap a super nifty silkscreen on it and, after we test the snot out of it, have some in the store in a couple months.</p> <p>Here it is hanging out in its home, the breadboard:</p> <p><a href="/static/images/old/2010/10/maplemini-breadboard.jpg"> <img src="/static/images/old/2010/10/maplemini-breadboard-770x510.jpg"> </a></p>okieWed, 20 Oct 2010 01:02:00 +0000tag:leaflabs.com,2010-10-20:/2010/10/maple-mini-prototype/IDE 0.0.8 [Emergency bugfix release]http://leaflabs.com//2010/10/ide-008-emergency-bugfix-release/<p>All users are urged to update to <a href="http://leaflabs.com/docs/maple-ide/">version 0.0.8 of the Maple IDE</a>.</p> <p>Version 0.0.7 contains a bug where <a href="http://leaflabs.com/docs/maple-ide/language/#additions">ASSERT</a> statements are disabled by default. Because of this, it will appear that all ASSERT statements pass. Version 0.0.8 addresses this issue.</p>mbolivarThu, 07 Oct 2010 10:52:00 +0000tag:leaflabs.com,2010-10-07:/2010/10/ide-008-emergency-bugfix-release/IDE 0.0.7 Released!http://leaflabs.com//2010/10/ide-007-released/<p>Well, it's a few days late, but the version 0.0.7 of the <a href="http://leaflabs.com/docs/maple-ide/">Maple IDE</a> is finally out!  This release contains many bugfixes, and brings us much closer to full Arduino compatibility.  New features include:</p> <ul> <li><a href="http://arduino.cc/en/Reference/Micros" title="micros()">micros()</a> is implemented.</li> <li>External interrupts (<a href="http://arduino.cc/en/Reference/AttachInterrupt" title="attachInterrupt()">attachInterrupt()</a>/<a href="http://arduino.cc/en/Reference/DetachInterrupt" title="http://arduino.cc/en/Reference/DetachInterrupt">detachInterrupt()</a>) are implemented (see the <a href="http://leaflabs.com/docs/maple-ide/external-interrupts/" title="external interrupts reference page">external interrupts reference page</a> for more information).</li> <li>Initial ports of the <a href="http://arduino.cc/en/Reference/Wire" title="Wire">Wire</a> and <a href="http://arduino.cc/en/Reference/LiquidCrystal" title="LiquidCrystal">LiquidCrystal</a> (thanks, <a href="http://github.com/AndyScott">AndyScott</a>!) libraries (see the <a href="http://leaflabs.com/docs/maple-ide/libraries/" title="libraries reference page">libraries reference page</a> for more information).</li> <li>support for <code>PWM_OPEN_DRAIN</code> in <a href="http://arduino.cc/en/Reference/PinMode">pinMode()</a><code>.</code> <p> </code></li> <li><a href="http://github.com/leaflabs/libmaple/commit/bdb85a454917a6e875c77ae12f9fd67961aebfae">Improved reset on OS X</a>.</li> <li>Libmaple support for enabling and disabling the SysTick timer via <code>systick_disable()</code> and <code>systick_resume()</code> in [<code>systick.h</code>][] (see Section 4.4 of the <a href="http://www.st.com/stonline/products/literature/pm/15491.pdf" title="programming">STM32F10xx programming manual</a> for more information about SysTick).  Paired with <a href="http://github.com/leaflabs/libmaple/blob/master/wirish/usb_serial.h#L40">SerialUSB.end()</a>, this means you can now use the Maple for timing-critical code  (more on this in an upcoming blog post!).</li> </ul> <p>Barring any emergency bugfix releases, this is the last time our  IDE release will be a fork of the standard <a href="http://arduino.cc/en/Main/Software">Arduino IDE</a>.  Working with the Arduino code was an awesome way for us to get started, but we're now well along on a fresh rewrite, which will be more stable, flexible, and featureful than our current version.  The new version to be released as 0.1.0; expect it to have ports for the last <a href="http://arduino.cc/en/Reference/AnalogReference">remaining</a> <a href="http://arduino.cc/en/Reference/Tone">unimplemented</a> <a href="http://arduino.cc/en/Reference/NoTone">Arduino</a> <a href="http://arduino.cc/en/Reference/PulseIn">core</a> <a href="http://arduino.cc/en/Reference/Interrupts">language</a> <a href="http://arduino.cc/en/Reference/NoInterrupts">functionality</a>.</p> <p>As always, feedback on the <a href="http://forums.leaflabs.com/">forums</a> is always welcome!</p>mbolivarMon, 04 Oct 2010 05:17:00 +0000tag:leaflabs.com,2010-10-04:/2010/10/ide-007-released/Thoughts on the OHShttp://leaflabs.com//2010/09/thoughts-on-the-ohs/<p>The Open Hardware Summit was in New York on Thursday. There was some blow-hard-ery, simmering free/open politics, and awkwardly delivered monologues, but there were also some great talkers and attendees with diverse wants and needs. I wish there had been more focused discussion about the Open Source Hardware Definition itself (now at v0.4 with only partial consensus), but it sounds like that discussion will spill over through Maker Faire this weekend and in the forums online.</p> <p>I like the general scope and content of the definition: it is not a license and does not concern itself with specifics, only general principles the entire community accepts. In general I think specific details should be resolved in specific licenses, but there are at least two broader issues I'd like to see discussed first.</p> <p>One issue that needs some clarification is what components of hardware are under discussion. I think that the definition should cover "devices" which are engineered systems which may consist of sub-components which are not themselves "open" or "free". The thing which is "open" should be the design that can be used to construct a tangible object with new functionality from the sub-components. For example, a device that consists only of SparkFun breakout modules with jumper wire connections all stuffed in a paper bag could be considered an OSHW device (even if the SparkFun boards were not) if it introduces a functionality. This is a slight departure from what most people are considering OSHW devices, which are PCB circuit boards fabricated and assembled from electronic design files roughly analogous to software source code.</p> <p>A second issue, which I do not have a solution to, arises from the promise that any person can use an OSHW device. In the case of Ham radio systems, a government-issued license would be required to actually use the device, so some license limitations must be allowed for. On the other hand, a hardware device specifically intended for use with the ZigBee wireless protocol can not be distributed for commercial purposes without consortium membership and the payment of license fees. Something about the former is acceptable while something about the later seems "not open", but I am not sure how to clearly and simply distinguish between the two cases.</p>bnewboldFri, 24 Sep 2010 12:28:00 +0000tag:leaflabs.com,2010-09-24:/2010/09/thoughts-on-the-ohs/Oof, out of stock!http://leaflabs.com//2010/09/oof-out-of-stock/<p>The long debate over how to space the 18 pin header on the new Maple dragged on just a hair too long. We are really happy with the new layout, 1/10" spacing everywhere and no major sacrifices to do it. However, this puts us about 2 weeks behind on fab for Maple Rev5. Just like Maple Rev2, we skipped over Rev4 to make these layout changes before fab.</p> <p>With any luck we will have some Rev5's to show (not sell) at Maker Faire! We will also bring the last remaining handful of Rev3's for people to pick up, and hopefully some cool demos. Rev5's will be open to preorders at the Faire! Lead time should be quick, 20 days ish.</p> <p><center> <img alt="Oh my god, what if nothing works?!" src="/static/images/old/2010/09/6daysToMaker-300x225.jpg" /> </center></p> <p>A big thanks to everyone participating on the forums! gbulmer, leaflabsAndy, amir, crenn, StephenFromNYC, x893, adamfeuer, and others - you guys are the best! Together weve brought up I2C, cleared a ton of bugs out, made some round table design decisions, and shared a whole lot of enthusiasm. 1335 posts and counting, and nearly as many unique users! We couldnt have asked for a better set of early adopters. For those of you who are waiting for the Maple platform to get a little more mature - thanks to these guys and the great work around the office, LeafLabs is growing up faster than we could have hoped! Thanks!</p> <p>And now for something cool - <em>Made With Maple</em></p> <p><a href="/static/images/old/2010/09/Maple_Deep_Note.wav">THX - Maple Style</a></p>poslathianSun, 19 Sep 2010 17:45:00 +0000tag:leaflabs.com,2010-09-19:/2010/09/oof-out-of-stock/Forums, Maker Faire, OHS, Projects!http://leaflabs.com//2010/09/forums-maker-faire-ohs-projects/<p>Some time last week we broke the 1000 post mark in the forums! We've got some amazing members dispensing advice, code, bug reports, and spelling suggestions. Thank you so much! It's exciting and very motivating to have an experienced set of users using our tools and shaking out any problems. We're looking for a good way to open up our ticketing system for bugs and feature requests to make the development process even more transparent and open to comment.</p> <p>The heat has finally broken in New England and we're looking forward to trundling down the road to New York City in two weeks for the Open Hardware Summit/Maker Faire NYC double ticket. We'll be in town Thursday debating open hardware principles and practicalities at the Open Hardware Summit, then will have a table with projects and demonstrations at Maker Faire on Saturday and Sunday. If you're in the area or traveling for either event drop by and say Hi, we love to chat up internet people and would be happy to poke at some projects or debug code!</p> <p><a href="http://www.openhardwaresummit.org/"><img class="size-full wp-image-1339" title="OHS_Logo-300x109" src="/static/images/old/2010/09/OHS_Logo-300x109.jpg" alt="" width="300" height="109" /></a></p> <p><strong>Thursday, September 23rd New York City, World Fair Grounds in Queens $40 ($25 artists + students +non-profit)</strong></p> <p><a href="http://makerfaire.com/newyork/2010/"><img class="size-full wp-image-1340" title="logo_newyork_2010_191x179" src="/static/images/old/2010/09/logo_newyork_2010_191x179.jpg" alt="" width="191" height="179" /></a></p> <p><strong>Saturday and Sunday, September 24th New York City, Hall of Science in Queens $10-25/day, $18-50/weekend</strong></p> <p>Lastly, you'll notice a new projects link at the top of the website for a projects section. We're hoping this page will grow and include projects written up by us and others demonstrating all the documented and "unofficial" capabilities of our boards and will be a place people can go to looking for practical tips and secret tricks. If you've got something to show off involving a LeafLabs board (or anything compatible/derived) we'd love to include; shoot us a link and brief description <a href="/contact/">here</a>!</p>bnewboldMon, 13 Sep 2010 18:35:00 +0000tag:leaflabs.com,2010-09-13:/2010/09/forums-maker-faire-ohs-projects/Unix Toolchain Instructions for Snow Leopardhttp://leaflabs.com//2010/08/unix-toolchain-instructions-for-snow-leopard/<p>Several users have contacted us about using the Unix toolchain on OS X, so they can develop programs for Maple without using the IDE. We've gotten it working on the latest version of Snow Leopard; <a href="http://leaflabs.com/docs/libmaple/unix-toolchain/">now you can, too</a>!</p>mbolivarTue, 31 Aug 2010 16:00:00 +0000tag:leaflabs.com,2010-08-31:/2010/08/unix-toolchain-instructions-for-snow-leopard/Short Descriptions of Some Audio Effectshttp://leaflabs.com//2010/08/short-descriptions-of-some-audio-effects/<p>This is a short list of descriptions of some audio effects that I put together for my work with audio processing on Maple so that I could easily look and come up with something in code. I left out some, like distortion and tremolo, that are either very obvious to me or too general (or have too many forms) to classify with a short description.</p> <p><strong>Noise Gate</strong></p> <p>Require signal level to reach a threshold before passing it. It's good to have a lower threshold to turn it off than used to turn it on to eliminate “chatter” or switching on and off during sound that's around the threshold. Sometimes a hold-time before the signal can be switched off is desirable.</p> <p><strong>Octave-up</strong></p> <p>Apply full-wave rectification and mix with original signal or FFT and shift all the bins to the bin with twice the frequency.</p> <p><strong>Octave-down</strong></p> <p>Convert signal to square wave, count the period, stretch by a factor of 2, and mix. Add another square wave stretched by a factor of four to create two octaves down. For a more natural sound, use the stretched square waves to modulate the polarity of the original signal. Doing this with the one octave down square wave produces frequencies at one half and three halves ratios of the “fundamental frequency” of the input signal. Octave-down effects are commonly used for kick drums to produce a “heavier” sound.</p> <p><strong>Phaser</strong></p> <p>The electronic phasing effect is created by splitting an audio signal into two paths. One path treats the signal with an all-pass filter, which preserves the amplitude of the original signal and alters the phase. The amount of change in phase depends on the frequency. When signals from the two paths are mixed, the frequencies that are out of phase will cancel each other out, creating a phaser's characteristic notches. Changing the mix ratio changes the depth of the notches; the deepest notches occur when the mix ratio is 50%. The phasors (not phasers) in the output of the discrete Fourier transform could also be rotated before the inverse transform is applied to achieve phasing.</p> <p><strong>Chorus</strong></p> <p>The chorus effect is produced by taking an audio signal and mixing it with one or more delayed, pitch-modulated copies of itself. The pitch of the added voices is typically modulated by an LFO, which makes the overall effect similar to that of a flanger, except with longer delays and without feedback.</p> <p><strong>Flanging</strong></p> <p>Flanging is an audio effect that occurs when two identical signals are mixed together, but with one signal time-delayed by a small and gradually changing amount, usually smaller than 20 milliseconds. This produces a swept comb filter effect: peaks and notches are produced in the resultant frequency spectrum, related to each other in a linear harmonic series. Varying the time delay causes these to sweep up and down the frequency spectrum. Part of the output signal is usually fed back to the input, producing a resonance effect which further enhances the intensity of the peaks and troughs. The phase of the fed-back signal is sometimes inverted, producing another variation on the flanging sound.</p> <p><strong>Reverberation</strong></p> <p>Feedback delay networks can be used to simulate or implement reverb. A convolution reverb can also be used, which can be understood by the fact the convolving the response of an environment to infinitely short impulse with a signal transforms the signal to how it would be in that environment. Gated reverb is an effect commonly applied to drums to make them sound more “punchy”. It is strong reverb that is often gated by the level of the original signal.</p> <p><strong>Ring Modulation</strong></p> <p>Ring modulation is achieved by multiplying two signals. Often one of the signals is something simple like a sine-wave or another simple waveform. The product is the sum and difference of and between the frequencies present in each waveform. Can be used to make speech sound robotic.</p> <p><strong>Vocoder</strong></p> <p>A vocoder is an analysis/synthesis system, mostly used for speech. In the encoder, the input is passed through a multi-band filter, each band is passed through an envelope follower, and the control signals from the envelope followers are communicated to the decoder. The decoder applies these (amplitude) control signals to corresponding filters in the (re)synthesizer.</p> <p><strong>Comb Filter</strong></p> <p>A comb filter adds a delayed version of a signal to itself, causing constructive and destructive interference. The frequency response of a comb filter consists of a series of regularly-spaced spikes, giving the appearance of a comb.</p>okieThu, 19 Aug 2010 21:53:00 +0000tag:leaflabs.com,2010-08-19:/2010/08/short-descriptions-of-some-audio-effects/Audio and Guitar effects on Maple!http://leaflabs.com//2010/07/audio-and-guitar-effects-on-maple/<p>Real-time audio processing is an example of an application where Maple really shines in comparison to Arduino. Maple has 12-bit ADCs with sample rates up to 1MSPS and PWM fast enough to clear ~11.8 bits of resolution (log2(72MHz/20kHz)=11.8) at a frequency twice the <a title="Nyquist frequency" href="http://en.wikipedia.org/wiki/Nyquist_frequency">Nyquist frequency</a> of the upper end of the bandwidth of the human ear (20kHz). And there's a lot of clock cycles to do all kinds of really awesome stuff to the signal (e.g. echo, distortion, octave, harmony, equalization, flange, phaser, fuzz, ring modulation, and complete new imagined effects)! I drew up a schematic and layout in <a href="http://www.cadsoftusa.com/">EAGLE</a> and etched a PCB with two 1/8" audio jacks, an adjustable preamp, input and output filters, and some potentiometers. Here's a photo of the assembled shield and the schematic: <p style="text-align: center;"><a href="/static/images/old/2010/07/maplebesideaudioshieldproto.jpg"> <img class="size-medium wp-image-1148" title="maplebesideaudioshieldproto" src="/static/images/old/2010/07/maplebesideaudioshieldproto-300x198.jpg" alt="" width="300" height="198" /></a> <a href="/static/images/old/dropbox/audioshieldproto-r2-v1-schematic.pdf"> <img class="size-medium wp-image-1145" title="audioshieldproto-r2-v1-schematic" src="/static/images/old/2010/07/audioshieldproto-r2-v1-schematic-300x201.png" alt="" width="300" height="201" /></a></p> <p style="text-align: center;">Note: The potentiometer knobs aren't on the schematic; I hand wired them afterwards.</p> <p style="text-align: center;">Here are the EAGLE schematic and board layout files for this board: <a href="/static/images/old/dropbox/audioshieldproto-r2-v1.sch">audioshieldproto-r2-v1.sch</a> <a href="/static/images/old/dropbox/audioshieldproto-r2-v1.brd">audioshieldproto-r2-v1.brd</a></p> This can also be breadboarded with some increase in noise, but it's not that bad for guitar. I made a similar board awhile ago that had no input filter, and it was a lot of fun, but I wanted to lower the noise floor of the system, which ends up sounding like a hiss in the background. To do this, I needed an input filter. Why? What happens is that the signal going into the ADC pin contains component frequencies above half the sampling rate of the ADC that get aliased back into the audible range. So any noise (environmental, digital transition, etc.) that contains frequencies above half the sample rate that's around make the output noisier. The purpose of the analog input filter is to filter them out before they are digitized. This is what what the input filter looks like: <p style="text-align: center;"><a href="/static/images/old/2010/07/400px-Sallen-Key_Lowpass_General.svg_.png"> <img class="alignnone size-full wp-image-1167" title="400px-Sallen-Key_Lowpass_General.svg" src="/static/images/old/2010/07/400px-Sallen-Key_Lowpass_General.svg_.png" alt="" width="400" height="200" /></a></p> <p style="text-align: left;">The filter is an <a href="http://en.wikipedia.org/wiki/Active_filter">active filter</a> of the <a href="http://en.wikipedia.org/wiki/Sallen%E2%80%93Key_topology">Sallen-Key topology</a>. I used AD8452 op-amps that I got from <a href="http://www.digikey.com/">Digi-Key</a>, which is one of the few op-amps suitable for 3.3V single supply operation. Another good op-amp for this, which I'll probably go with on the next version of this board, is the <a href="http://www.national.com/pf/LM/LM324.html">LM324</a>, which is a quad op-amp (four in a package). This will make it easier and cheaper to build a higher order input filter. I modeled the filter I built on this board with <a href="http://www.linear.com/designtools/software/ltspice.jsp">LTSpice</a> and this is what the frequency response looks like:</p> <p style="text-align: center;"><a href="/static/images/old/2010/07/mapleaudioshieldinputfilterfreqresponse.png"> <img class="aligncenter size-large wp-image-1171" title="mapleaudioshieldinputfilterfreqresponse" src="/static/images/old/2010/07/mapleaudioshieldinputfilterfreqresponse-770x390.png" alt="" width="770" height="390" /></a>Here's a link to the LTSpice schematic for the filter: <a href="/static/images/old/dropbox/sallen-keyinputlowpassfilter.asc">sallen-keyinputlowpassfilter.asc</a></p> <p style="text-align: left;">So what does it sound like? I'm obsessed with audio effects, but I don't play guitar. I tried to play guitar for these recordings. Here's a photo of the setup:</p> <p style="text-align: left;"><a href="/static/images/old/2010/07/mapleaudioshieldguitarheadphones.jpg"> <img class="aligncenter size-medium wp-image-1185" title="mapleaudioshieldguitarheadphones" src="/static/images/old/2010/07/mapleaudioshieldguitarheadphones-300x198.jpg" alt="" width="300" height="198" /></a></p> <p style="text-align: left;">To record the effect, I simply connected the output to my computer instead of headphones or a guitar amplifier.</p> <p style="text-align: left;">Here's an mp3 of the guitar just being passed through with no effect:</p> <p style="text-align: left;"><a href="/static/images/old/dropbox/audioshieldproto-passcleanguitar.mp3">audioshieldproto-passcleanguitar.mp3 </a></p> <p style="text-align: left;">This is where the knob that varies the mix between clean and the effect is turned about half-way up: <a href="/static/images/old/dropbox/audioshieldproto-halfeffectguitar.mp3"></a></p> <p style="text-align: left;"><a href="/static/images/old/dropbox/audioshieldproto-halfeffectguitar.mp3">audioshieldproto-halfeffectguitar.mp3</a></p> <p style="text-align: left;">Here's full effect:</p> <p style="text-align: left;"><a href="/static/images/old/dropbox/audioshieldproto-fulleffectguitar.mp3">audioshieldproto-fulleffectguitar.mp3</a></p> <p style="text-align: left;">These are with a sine and triangle wave input instead of a guitar and I turned the knob up and then down:</p> <p style="text-align: left;"><a href="/static/images/old/dropbox/audioshieldproto-sinewave-turningknob.mp3">audioshieldproto-sinewave-turningknob.mp3</a></p> <p style="text-align: left;"><a href="/static/images/old/dropbox/audioshieldproto-trianglewave-turningknob.mp3">audioshieldproto-trianglewave-turningknob.mp3</a></p> <p style="text-align: left;">I generated the sine and triangle waves with a signal generator app I downloaded onto an iPod Touch:<a href="/static/images/old/2010/07/mapleaudioshieldipodlaptop.jpg"></a></p> <p style="text-align: left;"><a href="/static/images/old/2010/07/mapleaudioshieldipodlaptop.jpg"> </a><a href="/static/images/old/2010/07/mapleaudioshieldipodlaptop.jpg"> <img class="aligncenter size-large wp-image-1180" title="mapleaudioshieldipodlaptop" src="/static/images/old/2010/07/mapleaudioshieldipodlaptop-397x600.jpg" alt="" width="397" height="600" /></a></p> <p style="text-align: left;">Notice the noise on all of these recordings. There are four main sources of this, which will be eliminated with more work. As mentioned, a higher input filter will rid of some noise. The code for the effect causes low amplitude signals are mapped to high amplitudes, which is another source of noise. This can be remedied by using a slightly different transfer function for the effect. A third source is from sampling an unbuffered 10k potentiometer. High-speed measurements made with the ADC require lower input impedances to achieve low noise. The reading of the potentiometer is being coupled to the input signal in the sketch for this effect by multiplying the reading by the input to derive the output. Most "control parameters" should probably be measured at a lower sample rate, and simply varying the mix of effect vs. no-effect is so common that it may should be a function that's done completely in analog.</p> <p style="text-align: left;">The final source of noise is really more of a systematic distortion. You might notice the non-gaussian sounding clicks/pops/ticks etc. This is likely due to timing irregularities in the sketch's execution. While Maple is running the sketch, it gets interrupted a lot. For example, regular systick interrupts trigger the system timer to increment when using millis(), regular USB interrupts provide the SerialUSB functionality. An improved version of an audio application might remedy this by using DMA and timer features of the stm32. On the sampling side, this might include configuring the ADC's to run in DMA mode, where they record samples into a buffer for you automatically without requiring any attention from the processor. You can then read from that buffer safe in the knowledge that the samples were captured at highly regular intervals (plus you save on processor time). On the output side, ideally we should be adjusting the PWM value at consistent intervals as well. To do this, we could configure a timer interrupt at high priority to guarantee an output event at fixed intervals such as 1/44000 of a second. These more advanced features are partially supported by the library in 0.0.6, and documentation is on the way. Check out <a href="http://www.st.com/mcu/familiesdocs-110.html">the app notes from ST</a> for more information on stuff that can be done to get the most out of the ADC systems onboard the stm32.</p> <p style="text-align: left;">Here's the sketch for the effect:</p></p> <pre class="code" style="width: 600px; height: 500px; overflow: auto;"><span style="color: #7e7e7e;">// Octave-ish/Harmonizer-ish Audio/Guitar Effect</span> <span style="color: #7e7e7e;">// for handmade prototype audio effects Maple shield</span> <span style="color: #7e7e7e;">// by okie and the leaf blowers</span> #define AIN 18 #define AOUT 6 #define POT 16 <span style="color: #cc6600;">int</span> knob = 0; <span style="color: #cc6600;">int</span> signalin = 0; <span style="color: #cc6600;">int</span> signalout = 0; <span style="color: #cc6600;">int</span> iomap[] = {256, 259, 262, 265, 268, 271, 274, 277, 281, 284, 287, 290, 293, 296, 299, 302, 305, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, 345, 348, 351, 353, 356, 359, 362, 365, 368, 371, 373, 376, 379, 382, 384, 387, 390, 392, 395, 398, 400, 403, 405, 408, 411, 413, 415, 418, 420, 423, 425, 427, 430, 432, 434, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 468, 470, 472, 473, 475, 477, 478, 480, 481, 483, 484, 486, 487, 488, 490, 491, 492, 493, 494, 495, 497, 498, 499, 500, 500, 501, 502, 503, 504, 505, 505, 506, 507, 507, 508, 508, 509, 509, 510, 510, 510, 511, 511, 511, 511, 511, 511, 511, 512, 511, 511, 511, 511, 511, 511, 511, 510, 510, 510, 509, 509, 508, 508, 507, 507, 506, 505, 505, 504, 503, 502, 501, 500, 500, 499, 498, 497, 495, 494, 493, 492, 491, 490, 488, 487, 486, 484, 483, 481, 480, 478, 477, 475, 473, 472, 470, 468, 467, 465, 463, 461, 459, 457, 455, 453, 451, 449, 447, 445, 443, 441, 439, 437, 434, 432, 430, 427, 425, 423, 420, 418, 415, 413, 411, 408, 405, 403, 400, 398, 395, 392, 390, 387, 384, 382, 379, 376, 373, 371, 368, 365, 362, 359, 356, 353, 351, 348, 345, 342, 339, 336, 333, 330, 327, 324, 321, 318, 315, 312, 309, 305, 302, 299, 296, 293, 290, 287, 284, 281, 277, 274, 271, 268, 265, 262, 259, 256, 252, 249, 246, 243, 240, 237, 234, 230, 227, 224, 221, 218, 215, 212, 209, 206, 202, 199, 196, 193, 190, 187, 184, 181, 178, 175, 172, 169, 166, 163, 160, 158, 155, 152, 149, 146, 143, 140, 138, 135, 132, 129, 127, 124, 121, 119, 116, 113, 111, 108, 106, 103, 100, 98, 96, 93, 91, 88, 86, 84, 81, 79, 77, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 43, 41, 39, 38, 36, 34, 33, 31, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 11, 10, 9, 8, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 30, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 77, 79, 81, 84, 86, 88, 91, 93, 96, 98, 100, 103, 106, 108, 111, 113, 116, 119, 121, 124, 127, 129, 132, 135, 138, 140, 143, 146, 149, 152, 155, 158, 160, 163, 166, 169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 206, 209, 212, 215, 218, 221, 224, 227, 230, 234, 237, 240, 243, 246, 249, 252, 255, 259, 262, 265, 268, 271, 274, 277, 281, 284, 287, 290, 293, 296, 299, 302, 305, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, 345, 348, 351, 353, 356, 359, 362, 365, 368, 371, 373, 376, 379, 382, 384, 387, 390, 392, 395, 398, 400, 403, 405, 408, 411, 413, 415, 418, 420, 423, 425, 427, 430, 432, 434, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 468, 470, 472, 473, 475, 477, 478, 480, 481, 483, 484, 486, 487, 488, 490, 491, 492, 493, 494, 495, 497, 498, 499, 500, 500, 501, 502, 503, 504, 505, 505, 506, 507, 507, 508, 508, 509, 509, 510, 510, 510, 511, 511, 511, 511, 511, 511, 511, 512, 511, 511, 511, 511, 511, 511, 511, 510, 510, 510, 509, 509, 508, 508, 507, 507, 506, 505, 505, 504, 503, 502, 501, 500, 500, 499, 498, 497, 495, 494, 493, 492, 491, 490, 488, 487, 486, 484, 483, 481, 480, 478, 477, 475, 473, 472, 470, 468, 467, 465, 463, 461, 459, 457, 455, 453, 451, 449, 447, 445, 443, 441, 439, 437, 434, 432, 430, 427, 425, 423, 420, 418, 415, 413, 411, 408, 405, 403, 400, 398, 395, 392, 390, 387, 384, 382, 379, 376, 373, 371, 368, 365, 362, 359, 356, 353, 351, 348, 345, 342, 339, 336, 333, 330, 327, 324, 321, 318, 315, 312, 309, 305, 302, 299, 296, 293, 290, 287, 284, 281, 277, 274, 271, 268, 265, 262, 259, 256, 252, 249, 246, 243, 240, 237, 234, 230, 227, 224, 221, 218, 215, 212, 209, 206, 202, 199, 196, 193, 190, 187, 184, 181, 178, 175, 172, 169, 166, 163, 160, 158, 155, 152, 149, 146, 143, 140, 138, 135, 132, 129, 127, 124, 121, 119, 116, 113, 111, 108, 106, 103, 100, 98, 96, 93, 91, 88, 86, 84, 81, 79, 77, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 43, 41, 39, 38, 36, 34, 33, 31, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 11, 10, 9, 8, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 30, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 77, 79, 81, 84, 86, 88, 91, 93, 96, 98, 100, 103, 106, 108, 111, 113, 116, 119, 121, 124, 127, 129, 132, 135, 138, 140, 143, 146, 149, 152, 155, 158, 160, 163, 166, 169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 206, 209, 212, 215, 218, 221, 224, 227, 230, 234, 237, 240, 243, 246, 249, 252, 255, 259, 262, 265, 268, 271, 274, 277, 281, 284, 287, 290, 293, 296, 299, 302, 305, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, 345, 348, 351, 353, 356, 359, 362, 365, 368, 371, 373, 376, 379, 382, 384, 387, 390, 392, 395, 398, 400, 403, 405, 408, 411, 413, 415, 418, 420, 423, 425, 427, 430, 432, 434, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 468, 470, 472, 473, 475, 477, 478, 480, 481, 483, 484, 486, 487, 488, 490, 491, 492, 493, 494, 495, 497, 498, 499, 500, 500, 501, 502, 503, 504, 505, 505, 506, 507, 507, 508, 508, 509, 509, 510, 510, 510, 511, 511, 511, 511, 511, 511, 511, 512, 511, 511, 511, 511, 511, 511, 511, 510, 510, 510, 509, 509, 508, 508, 507, 507, 506, 505, 505, 504, 503, 502, 501, 500, 500, 499, 498, 497, 495, 494, 493, 492, 491, 490, 488, 487, 486, 484, 483, 481, 480, 478, 477, 475, 473, 472, 470, 468, 467, 465, 463, 461, 459, 457, 455, 453, 451, 449, 447, 445, 443, 441, 439, 437, 434, 432, 430, 427, 425, 423, 420, 418, 415, 413, 411, 408, 405, 403, 400, 398, 395, 392, 390, 387, 384, 382, 379, 376, 373, 371, 368, 365, 362, 359, 356, 353, 351, 348, 345, 342, 339, 336, 333, 330, 327, 324, 321, 318, 315, 312, 309, 305, 302, 299, 296, 293, 290, 287, 284, 281, 277, 274, 271, 268, 265, 262, 259, 256, 252, 249, 246, 243, 240, 237, 234, 230, 227, 224, 221, 218, 215, 212, 209, 206, 202, 199, 196, 193, 190, 187, 184, 181, 178, 175, 172, 169, 166, 163, 160, 158, 155, 152, 149, 146, 143, 140, 138, 135, 132, 129, 127, 124, 121, 119, 116, 113, 111, 108, 106, 103, 100, 98, 96, 93, 91, 88, 86, 84, 81, 79, 77, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 43, 41, 39, 38, 36, 34, 33, 31, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 11, 10, 9, 8, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 30, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 77, 79, 81, 84, 86, 88, 91, 93, 96, 98, 100, 103, 106, 108, 111, 113, 116, 119, 121, 124, 127, 129, 132, 135, 138, 140, 143, 146, 149, 152, 155, 158, 160, 163, 166, 169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 206, 209, 212, 215, 218, 221, 224, 227, 230, 234, 237, 240, 243, 246, 249, 252, 255, 259, 262, 265, 268, 271, 274, 277, 281, 284, 287, 290, 293, 296, 299, 302, 305, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, 345, 348, 351, 353, 356, 359, 362, 365, 368, 371, 373, 376, 379, 382, 384, 387, 390, 392, 395, 398, 400, 403, 405, 408, 411, 413, 415, 418, 420, 423, 425, 427, 430, 432, 434, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 468, 470, 472, 473, 475, 477, 478, 480, 481, 483, 484, 486, 487, 488, 490, 491, 492, 493, 494, 495, 497, 498, 499, 500, 500, 501, 502, 503, 504, 505, 505, 506, 507, 507, 508, 508, 509, 509, 510, 510, 510, 511, 511, 511, 511, 511, 511, 511, 512, 511, 511, 511, 511, 511, 511, 511, 510, 510, 510, 509, 509, 508, 508, 507, 507, 506, 505, 505, 504, 503, 502, 501, 500, 500, 499, 498, 497, 495, 494, 493, 492, 491, 490, 488, 487, 486, 484, 483, 481, 480, 478, 477, 475, 473, 472, 470, 468, 467, 465, 463, 461, 459, 457, 455, 453, 451, 449, 447, 445, 443, 441, 439, 437, 434, 432, 430, 427, 425, 423, 420, 418, 415, 413, 411, 408, 405, 403, 400, 398, 395, 392, 390, 387, 384, 382, 379, 376, 373, 371, 368, 365, 362, 359, 356, 353, 351, 348, 345, 342, 339, 336, 333, 330, 327, 324, 321, 318, 315, 312, 309, 305, 302, 299, 296, 293, 290, 287, 284, 281, 277, 274, 271, 268, 265, 262, 259, 255, 252, 249, 246, 243, 240, 237, 234, 230, 227, 224, 221, 218, 215, 212, 209, 206, 202, 199, 196, 193, 190, 187, 184, 181, 178, 175, 172, 169, 166, 163, 160, 158, 155, 152, 149, 146, 143, 140, 138, 135, 132, 129, 127, 124, 121, 119, 116, 113, 111, 108, 106, 103, 100, 98, 96, 93, 91, 88, 86, 84, 81, 79, 77, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 43, 41, 39, 38, 36, 34, 33, 31, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 11, 10, 9, 8, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 30, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 77, 79, 81, 84, 86, 88, 91, 93, 96, 98, 100, 103, 106, 108, 111, 113, 116, 119, 121, 124, 127, 129, 132, 135, 138, 140, 143, 146, 149, 152, 155, 158, 160, 163, 166, 169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 206, 209, 212, 215, 218, 221, 224, 227, 230, 234, 237, 240, 243, 246, 249, 252, 255, 259, 262, 265, 268, 271, 274, 277, 281, 284, 287, 290, 293, 296, 299, 302, 305, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, 345, 348, 351, 353, 356, 359, 362, 365, 368, 371, 373, 376, 379, 382, 384, 387, 390, 392, 395, 398, 400, 403, 405, 408, 411, 413, 415, 418, 420, 423, 425, 427, 430, 432, 434, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 468, 470, 472, 473, 475, 477, 478, 480, 481, 483, 484, 486, 487, 488, 490, 491, 492, 493, 494, 495, 497, 498, 499, 500, 500, 501, 502, 503, 504, 505, 505, 506, 507, 507, 508, 508, 509, 509, 510, 510, 510, 511, 511, 511, 511, 511, 511, 511, 512, 511, 511, 511, 511, 511, 511, 511, 510, 510, 510, 509, 509, 508, 508, 507, 507, 506, 505, 505, 504, 503, 502, 501, 500, 500, 499, 498, 497, 495, 494, 493, 492, 491, 490, 488, 487, 486, 484, 483, 481, 480, 478, 477, 475, 473, 472, 470, 468, 467, 465, 463, 461, 459, 457, 455, 453, 451, 449, 447, 445, 443, 441, 439, 437, 434, 432, 430, 427, 425, 423, 420, 418, 415, 413, 411, 408, 405, 403, 400, 398, 395, 392, 390, 387, 384, 382, 379, 376, 373, 371, 368, 365, 362, 359, 356, 353, 351, 348, 345, 342, 339, 336, 333, 330, 327, 324, 321, 318, 315, 312, 309, 305, 302, 299, 296, 293, 290, 287, 284, 281, 277, 274, 271, 268, 265, 262, 259, 255, 252, 249, 246, 243, 240, 237, 234, 230, 227, 224, 221, 218, 215, 212, 209, 206, 202, 199, 196, 193, 190, 187, 184, 181, 178, 175, 172, 169, 166, 163, 160, 158, 155, 152, 149, 146, 143, 140, 138, 135, 132, 129, 127, 124, 121, 119, 116, 113, 111, 108, 106, 103, 100, 98, 96, 93, 91, 88, 86, 84, 81, 79, 77, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 43, 41, 39, 38, 36, 34, 33, 31, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 11, 10, 9, 8, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 30, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 77, 79, 81, 84, 86, 88, 91, 93, 96, 98, 100, 103, 106, 108, 111, 113, 116, 119, 121, 124, 127, 129, 132, 135, 138, 140, 143, 146, 149, 152, 155, 158, 160, 163, 166, 169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 206, 209, 212, 215, 218, 221, 224, 227, 230, 234, 237, 240, 243, 246, 249, 252, 255, 259, 262, 265, 268, 271, 274, 277, 281, 284, 287, 290, 293, 296, 299, 302, 305, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, 345, 348, 351, 353, 356, 359, 362, 365, 368, 371, 373, 376, 379, 382, 384, 387, 390, 392, 395, 398, 400, 403, 405, 408, 411, 413, 415, 418, 420, 423, 425, 427, 430, 432, 434, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 468, 470, 472, 473, 475, 477, 478, 480, 481, 483, 484, 486, 487, 488, 490, 491, 492, 493, 494, 495, 497, 498, 499, 500, 500, 501, 502, 503, 504, 505, 505, 506, 507, 507, 508, 508, 509, 509, 510, 510, 510, 511, 511, 511, 511, 511, 511, 511, 512, 511, 511, 511, 511, 511, 511, 511, 510, 510, 510, 509, 509, 508, 508, 507, 507, 506, 505, 505, 504, 503, 502, 501, 500, 500, 499, 498, 497, 495, 494, 493, 492, 491, 490, 488, 487, 486, 484, 483, 481, 480, 478, 477, 475, 473, 472, 470, 468, 467, 465, 463, 461, 459, 457, 455, 453, 451, 449, 447, 445, 443, 441, 439, 437, 434, 432, 430, 427, 425, 423, 420, 418, 415, 413, 411, 408, 405, 403, 400, 398, 395, 392, 390, 387, 384, 382, 379, 376, 373, 371, 368, 365, 362, 359, 356, 353, 351, 348, 345, 342, 339, 336, 333, 330, 327, 324, 321, 318, 315, 312, 309, 305, 302, 299, 296, 293, 290, 287, 284, 281, 277, 274, 271, 268, 265, 262, 259, 256, 252, 249, 246, 243, 240, 237, 234, 230, 227, 224, 221, 218, 215, 212, 209, 206, 202, 199, 196, 193, 190, 187, 184, 181, 178, 175, 172, 169, 166, 163, 160, 158, 155, 152, 149, 146, 143, 140, 138, 135, 132, 129, 127, 124, 121, 119, 116, 113, 111, 108, 106, 103, 100, 98, 96, 93, 91, 88, 86, 84, 81, 79, 77, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 43, 41, 39, 38, 36, 34, 33, 31, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 11, 10, 9, 8, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 30, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 77, 79, 81, 84, 86, 88, 91, 93, 96, 98, 100, 103, 106, 108, 111, 113, 116, 119, 121, 124, 127, 129, 132, 135, 138, 140, 143, 146, 149, 152, 155, 158, 160, 163, 166, 169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 206, 209, 212, 215, 218, 221, 224, 227, 230, 234, 237, 240, 243, 246, 249, 252, 255, 259, 262, 265, 268, 271, 274, 277, 281, 284, 287, 290, 293, 296, 299, 302, 305, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, 345, 348, 351, 353, 356, 359, 362, 365, 368, 371, 373, 376, 379, 382, 384, 387, 390, 392, 395, 398, 400, 403, 405, 408, 411, 413, 415, 418, 420, 423, 425, 427, 430, 432, 434, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 468, 470, 472, 473, 475, 477, 478, 480, 481, 483, 484, 486, 487, 488, 490, 491, 492, 493, 494, 495, 497, 498, 499, 500, 500, 501, 502, 503, 504, 505, 505, 506, 507, 507, 508, 508, 509, 509, 510, 510, 510, 511, 511, 511, 511, 511, 511, 511, 512, 511, 511, 511, 511, 511, 511, 511, 510, 510, 510, 509, 509, 508, 508, 507, 507, 506, 505, 505, 504, 503, 502, 501, 500, 500, 499, 498, 497, 495, 494, 493, 492, 491, 490, 488, 487, 486, 484, 483, 481, 480, 478, 477, 475, 473, 472, 470, 468, 467, 465, 463, 461, 459, 457, 455, 453, 451, 449, 447, 445, 443, 441, 439, 437, 434, 432, 430, 427, 425, 423, 420, 418, 415, 413, 411, 408, 405, 403, 400, 398, 395, 392, 390, 387, 384, 382, 379, 376, 373, 371, 368, 365, 362, 359, 356, 353, 351, 348, 345, 342, 339, 336, 333, 330, 327, 324, 321, 318, 315, 312, 309, 305, 302, 299, 296, 293, 290, 287, 284, 281, 277, 274, 271, 268, 265, 262, 259, 255, 252, 249, 246, 243, 240, 237, 234, 230, 227, 224, 221, 218, 215, 212, 209, 206, 202, 199, 196, 193, 190, 187, 184, 181, 178, 175, 172, 169, 166, 163, 160, 158, 155, 152, 149, 146, 143, 140, 138, 135, 132, 129, 127, 124, 121, 119, 116, 113, 111, 108, 106, 103, 100, 98, 96, 93, 91, 88, 86, 84, 81, 79, 77, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 43, 41, 39, 38, 36, 34, 33, 31, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 11, 10, 9, 8, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 30, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 77, 79, 81, 84, 86, 88, 91, 93, 96, 98, 100, 103, 106, 108, 111, 113, 116, 119, 121, 124, 127, 129, 132, 135, 138, 140, 143, 146, 149, 152, 155, 158, 160, 163, 166, 169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 206, 209, 212, 215, 218, 221, 224, 227, 230, 234, 237, 240, 243, 246, 249, 252, 255, 259, 262, 265, 268, 271, 274, 277, 281, 284, 287, 290, 293, 296, 299, 302, 305, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, 345, 348, 351, 353, 356, 359, 362, 365, 368, 371, 373, 376, 379, 382, 384, 387, 390, 392, 395, 398, 400, 403, 405, 408, 411, 413, 415, 418, 420, 423, 425, 427, 430, 432, 434, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 468, 470, 472, 473, 475, 477, 478, 480, 481, 483, 484, 486, 487, 488, 490, 491, 492, 493, 494, 495, 497, 498, 499, 500, 500, 501, 502, 503, 504, 505, 505, 506, 507, 507, 508, 508, 509, 509, 510, 510, 510, 511, 511, 511, 511, 511, 511, 511, 512, 511, 511, 511, 511, 511, 511, 511, 510, 510, 510, 509, 509, 508, 508, 507, 507, 506, 505, 505, 504, 503, 502, 501, 500, 500, 499, 498, 497, 495, 494, 493, 492, 491, 490, 488, 487, 486, 484, 483, 481, 480, 478, 477, 475, 473, 472, 470, 468, 467, 465, 463, 461, 459, 457, 455, 453, 451, 449, 447, 445, 443, 441, 439, 437, 434, 432, 430, 427, 425, 423, 420, 418, 415, 413, 411, 408, 405, 403, 400, 398, 395, 392, 390, 387, 384, 382, 379, 376, 373, 371, 368, 365, 362, 359, 356, 353, 351, 348, 345, 342, 339, 336, 333, 330, 327, 324, 321, 318, 315, 312, 309, 305, 302, 299, 296, 293, 290, 287, 284, 281, 277, 274, 271, 268, 265, 262, 259, 256, 252, 249, 246, 243, 240, 237, 234, 230, 227, 224, 221, 218, 215, 212, 209, 206, 202, 199, 196, 193, 190, 187, 184, 181, 178, 175, 172, 169, 166, 163, 160, 158, 155, 152, 149, 146, 143, 140, 138, 135, 132, 129, 127, 124, 121, 119, 116, 113, 111, 108, 106, 103, 100, 98, 96, 93, 91, 88, 86, 84, 81, 79, 77, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 43, 41, 39, 38, 36, 34, 33, 31, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 11, 10, 9, 8, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 30, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 77, 79, 81, 84, 86, 88, 91, 93, 96, 98, 100, 103, 106, 108, 111, 113, 116, 119, 121, 124, 127, 129, 132, 135, 138, 140, 143, 146, 149, 152, 155, 158, 160, 163, 166, 169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 206, 209, 212, 215, 218, 221, 224, 227, 230, 234, 237, 240, 243, 246, 249, 252}; <span style="color: #cc6600;">void</span> <span style="color: #cc6600;"><strong>setup</strong></span>() {   <span style="color: #cc6600;">pinMode</span>(AIN, <span style="color: #006699;">INPUT_ANALOG</span>);   <span style="color: #cc6600;">pinMode</span>(AOUT, <span style="color: #006699;">PWM</span>);   <span style="color: #cc6600;">pinMode</span>(POT, <span style="color: #006699;">INPUT_ANALOG</span>);   <span style="color: #7e7e7e;">// make PWM frequency at least greater than two times the upper end of the</span>   <span style="color: #7e7e7e;">// signal bandwidth (signal bandwidth: ~20-20000Hz)</span>   timers_set_reload(1, 0x0200); } <span style="color: #cc6600;">void</span> <span style="color: #cc6600;"><strong>loop</strong></span>() {   signalin = <span style="color: #cc6600;">analogRead</span>(AIN);   knob = <span style="color: #cc6600;">analogRead</span>(POT);   <span style="color: #7e7e7e;">// output: mix raw input and the input mapped to a sine wave stored in iomap</span>   <span style="color: #7e7e7e;">// where the mix is weighted by the knob </span>   <span style="color: #7e7e7e;">// also: </span>   <span style="color: #7e7e7e;">// - scale raw input term by 8 to convert 12-bit ADC reading to 9-bit PWM</span>   <span style="color: #7e7e7e;">// - iomap already scales the signal by 8, but scale by 8 again because its</span>   <span style="color: #7e7e7e;">// shape is natually louder than raw signal </span>   <span style="color: #7e7e7e;">// - scale both terms by the range of the knob reading, 4096 </span>   <span style="color: #7e7e7e;">// - divide by 2 because two full scale signals are summed</span>   signalout = (signalin*knob/8 + iomap[signalin]*(4096-knob)/4)/4096/2;   pwmWrite(AOUT,signalout); }</pre> <p>This sketch is just a quick, easy way to do what it does. Many optimizations can be made for memory, speed, and using timers to make readings and output to PWM would reduce distortion. The main function of this code is to map every possible input value to a different output, which is a really simple concept that can create a slew of neat effects, many which are very common. Here's a neat webpage about it: <a href="http://web.inter.nl.net/hcc/davies/apmicro.html">http://web.inter.nl.net/hcc/davies/apmicro.html</a></p> <p>The mapping being done by my sketch is stored in the array called "iomap". I computed this array with a simple Python script. Here's a graph of the map and the script: <p style="text-align: center;"><a href="/static/images/old/2010/07/iomap.png"> <img class="aligncenter size-medium wp-image-1189" title="iomap" src="/static/images/old/2010/07/iomap-770x584.png" alt="" width="770" height="584" /></a></p> <p style="text-align: center;">Python script: <a href="/static/images/old/dropbox/iomapgenerator.py">iomapgenerator.py</a></p> <p style="text-align: left;">The horizontal axis is input and the vertical axis is output. I think the behavior of this mapping is interesting. A very low amplitude sine wave is simply amplified but as the amplitude becomes larger, it gets transformed into sine waves with frequencies that are octaves above it.</p> <p style="text-align: left;">We're interested in your comments and ideas! And if you're interested in continued development on a shield for this stuff, let us know.</p></p>okieSat, 24 Jul 2010 09:46:00 +0000tag:leaflabs.com,2010-07-24:/2010/07/audio-and-guitar-effects-on-maple/IDE 0.0.6 Release, Horray!http://leaflabs.com//2010/07/ide-006-release-horray/<p>It's been a long week coming, but the latest/greatest version of the IDE has been released; get it now from the <a href="/docs/maple/install/">install</a> page or the following direct links. If you're upgrading, you can just back up your old IDE directory and extract the archive to the same place.</p> <ul> <li>Windows XP 32-bit: <a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.6-windowsxp32.zip">http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.6-windowsxp32.zip</a></li> <li>Linux 32-bit: <a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.6-linux32.tgz">http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.6-linux32.tgz</a></li> <li>Linux 64-bit: <a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.6-linux64.tgz">http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.6-linux64.tgz</a></li> <li>Mac OSX 10.6 32-bit: <a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.6-macosx-10_6.dmg">http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.6-macosx-10_6.dmg</a></li> </ul> <p>Most of the changes were in libmaple; the primary focus was on fixing SerialUSB issues (blocking and autoreset), squashing bugs, and adding interrupt support to the hardware timers.</p> <p><strong>Fixed SerialUSB.print() blocking issue:</strong> Usercode would frequently not run when disconnected from a serial port monitor; now it should at least run slowly. See <a href="/docs/maple/usb/">USB docs</a> for more details; in the long run we intend to add even more flexibility here.</p> <p><strong>Changed USB reset scheme:</strong> Hopefully fixes some issues with auto-reset on Windows XP.</p> <p><strong>init() called earlier (thanks xttocs!):</strong> This should help porting some libraries.</p> <p><strong>New Makefile scheme for libmaple:</strong> Smarter, less magical, rules based Makefile system.</p> <p><strong>Improved udev rule:</strong> Hopefully fixes some issues for Ubuntu 10.04 users.</p> <p><strong>SerialN.end() and SerialN.flush() methods:</strong> By popular request!</p> <p><strong>New Timer class for configuring interrupts with the hardware timers:</strong> Whole bunch of goodness! See the <a href="/docs/maple/timers/">docs</a>.</p> <p><strong>More:</strong> Many documentation updates, new highlighted keywords, and examples for <a href="http://leaflabs.com/2010/07/serial-usb-passthrough/">Serial passthrough</a>, the timers, SerialUSB, and <a href="http://www.flickr.com/photos/48069758@N08/4734657030/">crude VGA</a>.</p> <p>For a complete list of changes see these github changelogs for <a href="http://github.com/leaflabs/maple-ide/compare/0.0.5...v0.0.6">the IDE</a> and <a href="http://github.com/leaflabs/libmaple/compare/v0.0.5...v0.0.6">libmaple</a>.</p> <p>Please post your successes, failures, comments, and condolences in <a href="http://forums.leaflabs.com/topic.php?id=106">this forum thread</a>, and have a productive weekend!</p>bnewboldThu, 22 Jul 2010 22:59:00 +0000tag:leaflabs.com,2010-07-22:/2010/07/ide-006-release-horray/The Beaglepede Cometh.http://leaflabs.com//2010/07/the-beaglepede-cometh/<p>This weekend Barry and I found ourselves in a Dollar Tree store-- one of the greatest places known to man.</p> <p>We picked ourselves up some toys to play with, all for a dollar:</p> <p><center> <dl id="attachment_1090" class="wp-caption alignnone" style="width: 460px;"> <dt class="wp-caption-dt"> <img class="size-large wp-image-1090" title="100_0146" src="/static/images/old/2010/07/100_0119-450x600.jpg" alt="" width="300" /> </dt><dd class="wp-caption-dd"> That plush guy had the face of a beagle, but the body of a centipede, perfect for segmented lighting! You can also see our prototype, and the weird kaleidoscope plastic things we used in his back. </dd></dl> </center></p> <p>We named that friendly fellow the Beaglepede, after the obvious portmanteau, and decided to actualize his inner nature: warm and glowing. So we took those weird disco lanterns and a few LEDs  and made the little guy shine.</p> <p><center> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Qq-2YjmYIY8&amp;hl=en_US&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/Qq-2YjmYIY8&amp;hl=en_US&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"> </embed></object> </center></p> <p>The code we used can be found down below. Basically it reads from a button, which changes the state between off and glowing each LED in sequence. The circuit is similarly simple, the diagram also can be found below.</p> <p>What I think is particularly cool about this project, is that the most expensive parts(barring the maple), were the LEDs, and the most eye-catching parts were essentially found. It's also a fairly simple and quick project (an evening for two people) that pretty much anyone can make, but it's still fun and exciting to finish.</p> <p>So, onward to dollar stores and thrift stores alike! Deconstruct and reconstruct your own Shellyesque army of franken-hacks! Godspeed and good luck!</p> <!--more--> <p>Here's the code:</p> <pre class="code" style="text-align: left; width:600px;"><span style="color: #7e7e7e;">//Code for Mr. Blinkie, AKA the psychedelic beaglepede</span> <span style="color: #7e7e7e;">//July 17 2010</span> <span style="color: #7e7e7e;">//Written by Hadley Piper</span> <span style="color: #cc6600;">int</span> state = 0; <span style="color: #7e7e7e;">// we declare these here so they can be accessed globally, </span> <span style="color: #cc6600;">int</span> button = 0; <span style="color: #7e7e7e;">// meaning in different functions.</span> <span style="color: #cc6600;">void</span> wave(){ <span style="color: #7e7e7e;">// this is the function that controlls the light</span>   <span style="color: #cc6600;">int</span> i;   <span style="color: #cc6600;">int</span> j; <span style="color: #7e7e7e;">// counter variables</span>           <span style="color: #7e7e7e;">//we put the LED's sequentially in pins 5-9 for looping convenience</span>   <span style="color: #cc6600;">for</span> (i = 5; i&lt; 10; i++){ <span style="color: #7e7e7e;">// i counts the LED pin</span>     <span style="color: #cc6600;">if</span> (<span style="color: #cc6600;">digitalRead</span>(button) == <span style="color: #006699;">HIGH</span>){ <span style="color: #7e7e7e;">//check for button press</span>       state = 0;       <span style="color: #cc6600;">break</span>;     }    <span style="color: #cc6600;">if</span> (state == 0) <span style="color: #cc6600;">break</span>; <span style="color: #7e7e7e;">//check if button was pressed during inner loop</span>      <span style="color: #cc6600;">for</span> (j = 0; j&lt;=50050; j+=350){ <span style="color: #7e7e7e;">//loop to fade each LED on</span>      <span style="color: #cc6600;">analogWrite</span>(i,j); <span style="color: #7e7e7e;">//set pin i to pwm duty cycle j</span>       <span style="color: #cc6600;">delay</span>(1); <span style="color: #7e7e7e;">//small aesthetic delay</span>       <span style="color: #cc6600;">if</span> (<span style="color: #cc6600;">digitalRead</span>(button) == <span style="color: #006699;">HIGH</span>){ <span style="color: #7e7e7e;">//another check for button press</span>         state = 0;         <span style="color: #cc6600;">break</span>;       }     }     <span style="color: #cc6600;">delay</span>(100); <span style="color: #7e7e7e;">//let the light stay on for a bit</span>     <span style="color: #cc6600;">for</span> (j = 50050; j&gt;=0; j-=350){ <span style="color: #7e7e7e;">//loop to fade each LED off</span>       <span style="color: #cc6600;">analogWrite</span>(i,j); <span style="color: #7e7e7e;">//set pin i to pwm duty cycle j</span>       <span style="color: #cc6600;">delay</span>(1); <span style="color: #7e7e7e;">//small aesthetic delay, again</span>       <span style="color: #cc6600;">if</span> (<span style="color: #cc6600;">digitalRead</span>(button) == <span style="color: #006699;">HIGH</span>){ <span style="color: #7e7e7e;">//last check for button press</span>         state = 0;         <span style="color: #cc6600;">break</span>;       }     }     <span style="color: #cc6600;">delay</span>(100); <span style="color: #7e7e7e;">//third aesthetic delay</span>   } } <span style="color: #cc6600;">void</span> <span style="color: #cc6600;"><strong>setup</strong></span>(){   <span style="color: #cc6600;">pinMode</span>(5, PWM); <span style="color: #7e7e7e;">//set the LED pins to PWM</span>   <span style="color: #cc6600;">pinMode</span>(6, PWM);   <span style="color: #cc6600;">pinMode</span>(7, PWM);   <span style="color: #cc6600;">pinMode</span>(8, PWM);   <span style="color: #cc6600;">pinMode</span>(9, PWM);   <span style="color: #cc6600;">pinMode</span>(button, <span style="color: #006699;">INPUT</span>); <span style="color: #7e7e7e;">//set button pin to input</span> } <span style="color: #cc6600;">void</span> <span style="color: #cc6600;"><strong>loop</strong></span>(){   <span style="color: #cc6600;">if</span> (state == 0 ){ <span style="color: #7e7e7e;">//turn all LED's off in resting state</span>     <span style="color: #cc6600;">analogWrite</span>(5, 000);     <span style="color: #cc6600;">analogWrite</span>(6, 000);     <span style="color: #cc6600;">analogWrite</span>(7, 000);     <span style="color: #cc6600;">analogWrite</span>(8, 000);     <span style="color: #cc6600;">analogWrite</span>(9, 000);     <span style="color: #cc6600;">if</span> (<span style="color: #cc6600;">digitalRead</span>(button) == <span style="color: #006699;">HIGH</span>){ <span style="color: #7e7e7e;">//check to see if button was pressed</span>       state = 1;       <span style="color: #cc6600;">delay</span>(500);       SerialUSB.<span style="color: #cc6600;">println</span>(<span style="color: #006699;">"I am the Great BEAGLEPEDE!!"</span>); <span style="color: #7e7e7e;">//a sign of things to come</span>     }   }   <span style="color: #cc6600;">if</span> (state == 1){ <span style="color: #7e7e7e;">//if the button is in state 1, call the wave function</span>     wave();     <span style="color: #cc6600;">if</span> (<span style="color: #cc6600;">digitalRead</span>(button) == <span style="color: #006699;">HIGH</span>){ <span style="color: #7e7e7e;">//check for button press and reset to state 0</span>       state = 0;       <span style="color: #cc6600;">delay</span>(500);     }   } }</pre> <p>And here's the schematic:</p> <p><center> <dl id="attachment_1090" class="wp-caption alignnone" style="width: 460px;"> <dt class="wp-caption-dt"><a rel="attachment wp-att-1090" href="http://leaflabs.com/2010/07/the-beaglepede-cometh/100_0146/"><img class="size-large wp-image-1090" title="100_0146" src="/static/images/old/2010/07/100_0146-450x600.jpg" alt="" width="300" /></a></dt> <dd class="wp-caption-dd">Ignore the letters on the right... they're not related to the diagram.</dd> </dl> </center></p> <p>I'm excited to have the beaglepede around because I think he's going to be a cool visualizer...there's lots of things you can do with a row of LEDs!</p> <p><center> <dl id="attachment_1090" class="wp-caption alignnone" style="width: 460px;"> <dt class="wp-caption-dt"> <img class="size-large wp-image-1090" title="100_0146" src="/static/images/old/2010/07/100_0143-214x300.jpg" alt="" width="300" /> </dt><dd class="wp-caption-dd"> Bye bye, Beaglepede. </dd></dl> </center></p>HadleySun, 18 Jul 2010 20:58:00 +0000tag:leaflabs.com,2010-07-18:/2010/07/the-beaglepede-cometh/Serial-USB Passthroughhttp://leaflabs.com//2010/07/serial-usb-passthrough/<p>While debugging our new SerialUSB implementation I needed to use the regular Serial2 interface to track down ASSERT failures, but couldn't find a spare FTDI chip around the lab. I've got one of <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8551">these</a> super slick little ones in the mail, but in the meanwhile I wrote this sketch in about 2 seconds which turns a spare Maple into a Serial-USB passthrough:</p> <div class="codehilite"><pre><span class="kt">void</span> <span class="nf">setup</span><span class="p">()</span> <span class="p">{</span> <span class="n">Serial2</span><span class="p">.</span><span class="n">begin</span><span class="p">(</span><span class="mi">9600</span><span class="p">);</span> <span class="p">}</span> <span class="kt">void</span> <span class="nf">loop</span><span class="p">()</span> <span class="p">{</span> <span class="k">if</span><span class="p">(</span><span class="n">SerialUSB</span><span class="p">.</span><span class="n">available</span><span class="p">())</span> <span class="p">{</span> <span class="n">Serial2</span><span class="p">.</span><span class="n">write</span><span class="p">(</span><span class="n">SerialUSB</span><span class="p">.</span><span class="n">read</span><span class="p">());</span> <span class="p">}</span> <span class="k">if</span><span class="p">(</span><span class="n">Serial2</span><span class="p">.</span><span class="n">available</span><span class="p">())</span> <span class="p">{</span> <span class="n">SerialUSB</span><span class="p">.</span><span class="n">write</span><span class="p">(</span><span class="n">Serial2</span><span class="p">.</span><span class="n">read</span><span class="p">());</span> <span class="p">}</span> <span class="p">}</span> </pre></div> <p>There are a million better ways to do this but I love how easy this was!</p>bnewboldSun, 18 Jul 2010 10:20:00 +0000tag:leaflabs.com,2010-07-18:/2010/07/serial-usb-passthrough/Weekly Goodies!http://leaflabs.com//2010/06/weekly-goodies/<p><center> <img alt="" src="/static/images/old/2010/06/sea-of-maples_cropped-770x280.jpg" title="sea-of-maples_cropped" /> </center></p> <p>We got a big new batch of Maple rev3 boards in a couple days ago... we got Nintendo style with this batch and have pushed the heck out of the buttons on every board we will ship to make sure they aren't "sticky"; doves cried tears of sorrow when a few people got finiky boards in the last batch. We also built a head-crab style zombie Maple to test the connectivity of every single GPIO pin:</p> <p><center> <img alt="" src="/static/images/old/2010/06/piggy-back.jpg" title="piggy-back" /> </center></p> <p>These boards are on sale in our <a href="/store/">shop</a> and now also available through our first distributor <a href="http://www.robotshop.com/">RobotShop</a>. Check out the <a href="http://www.robotshop.com/content/images/banners/leaflabs.jpg">awesome Maple graphic</a> they made! If you're a distributor who would like to stock Maple we'd love to talk to you, especially if you are overseas; hit up our <a href="/contact/">contact form</a>.</p> <p>I finally wrote up a <a href="/docs/libmaple/unix-toolchain/">quickstart</a> for programming the Maple from the Unix command line; this setup makes it easier to track the most recent changes to libmaple and even contribute patches. As a bonus I also got <a href="http://www.codeblocks.org/">Code::Blocks</a> working as an alternative to the Maple IDE:</p> <p><center> <img alt="" src="/static/images/old/2010/06/codeblocks_build-300x241.png" title="codeblocks_build" />] </center></p> <p>We'll leave you with this kick ass project video from okie; what kinds of hackery have you been up to with your Maples?</p> <p><center> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="505" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="src" value="http://www.youtube.com/v/Jr2ZsedYxPM&amp;hl=en_US&amp;fs=1&amp;color1=0x234900&amp;color2=0x4e9e00"></param><param name="allowfullscreen" value="true"></param><embed type="application/x-shockwave-flash" width="640" height="505" src="http://www.youtube.com/v/Jr2ZsedYxPM&amp;hl=en_US&amp;fs=1&amp;color1=0x234900&amp;color2=0x4e9e00" allowscriptaccess="always" allowfullscreen="true"></embed></object> </center></p>bnewboldFri, 18 Jun 2010 18:06:00 +0000tag:leaflabs.com,2010-06-18:/2010/06/weekly-goodies/Maple IDE 0.0.5!http://leaflabs.com//2010/06/maple-ide-005/<p><img class="aligncenter size-large wp-image-1038" title="Screen shot 2010-06-10 at 2.44.47 PM" src="/static/images/old/2010/06/Screen-shot-2010-06-10-at-2.44.47-PM-770x481.png" alt="" width="770" height="481" /></p> <p>New Maple IDE release today, direct links below!</p> <p>This is notable as our first Mac OSX 10.6 release (finally!), and hopefully the last version before a stable and consistent 0.1.0 release. Other changes include getting rid of "HardwareUsb" (use the already-instantiated "SerialUSB" instead), a much more robust reset scheme (including a DFU search period that should fix timing issues many people were having), and a "less blocking" Serial-over-USB implementation.</p> <p>Note that for the first program upload with with this new release you may have to put your Maple in "perpetual bootloader mode" by holding the BUT button immediately <em>after</em> releasing the RESET button; you would only have to do this once. More details in the linked forum post linked at the bottom. <ul> <li>Windows XP 32-bit: <a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.5-windowsxp32.zip">http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.5-windowsxp32.zip</a></li> <li>Linux 32-bit: <a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.5-linux32.tgz">http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.5-linux32.tgz</a></li> <li>Linux 64-bit: <a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.5-linux64.tgz">http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.5-linux64.tgz</a></li> <li>Mac OSX 10.6 32-bit: <a href="http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.5-macosx-10_6.dmg">http://static.leaflabs.com/pub/leaflabs/maple-ide/maple-ide-0.0.5-macosx-10_6.dmg</a></li> </ul> We tested on all the computers we had around the office but there are tons of details and incompatibilities out there, please let us know in the forums if you have any problems! I'll kick things off with some known issues in <a href="http://forums.leaflabs.com/topic.php?id=51">this thread</a>.</p> <p>Have a great weekend, and happy hacking!</p>bnewboldFri, 11 Jun 2010 16:35:00 +0000tag:leaflabs.com,2010-06-11:/2010/06/maple-ide-005/KYE-cad? KEY-cad? kay-EYE-cad?http://leaflabs.com//2010/06/kye-cad-key-cad-kay-eye-cad/<p>So way back when, after we announced that Maple was moving to a four-layer design, several of you suggested that we give <a href="http://kicad.sourceforge.net/wiki/index.php/Main_Page">KiCad</a> a try. KiCad is open source under GPL, and (unlike the free version of Eagle) plays nicely with four-layer designs, which are both, you know, pretty good things, so we decided to give it a whirl for the design of Maple Native<super>[<abbr title="We're getting a lot of inquiries about timeline for Maple Native, so I">1</abbr>]</super>.</p> <p>Overall, it went pretty well – the software is reasonably intuitive and I didn't encounter any huge blocking issues. The assorted “getting started” resources out there are pretty comprehensive. Obviously there are glitches and idiosyncrasies that take some getting used to. KiCad seems to have a large user community which was invaluable for dealing with problems beyond the level of the readily available documentation, but I found it to be pretty scattered which can make ferreting out solutions difficult.</p> <p>One of my biggest annoyances was the way KiCad handles via connectivity to zones. If you're trying to connect a trace to a power plane on another layer, you can't simply place a via to the power plane. Before doing a zone fill on the power plane, you must go in and manually connect all the vias on the power plane layer to one another, and then to the zone fill, which essentially “covers” all the traces you just drew. It's not a huge time sink, but I can't think of any reason it's a good idea to do it this way, and it took me a long time to figure out that yes, this is actually the way it's supposed to work.</p> <p>Hotkeys also gave me some grief. I'm running KiCad in an Ubuntu VM on a Mac (complete with silly little Mac chiclet keyboard and mouse) so a lot of the hotkeys didn't work properly out of the box, and nobody seems to be able to get editing the hotkeys config file to work properly. Even lacking certain hotkeys routing was still reasonably painless, however, which is pretty impressive. The “hug traces” function is nice.</p> <p>Setting drill sizes was also sort of obnoxious. There doesn't appear to be a way to select a via and find out and/or edit what its drill size is. You can only choose to set it to default or alt, which means you can only have two possible drill sizes for vias, maybe...? And changing the default drill size seems to go back and change all the vias you've already placed, maybe...? To be honest by this point in the design process I had routing-brain a little too badly to figure out the software and ended up just editing the .drl file by hand which of course was a wee bit buggy. I'll have to better figure out how KiCad handles drill sizes before we spin the next prototype, so if anyone has any tricks they want to share, please do.</p> <p>So what about you guys? KiCad users, weigh in!</p> <p>just want to reiterate: we're chugging away as fast as we can, but we don't feel comfortable committing to a release date just yet. We've got a prototype in our hot little hands, and right now we're at the “basic functionality” stage of testing. One major item still on the to-do list is bringing up the FSMC bus for the memory chip, and then, you know, fixing the myriad problems with the board design that will undoubtedly come up during testing. Extrapolate from that as you will.*</p>jessbThu, 10 Jun 2010 01:00:00 +0000tag:leaflabs.com,2010-06-10:/2010/06/kye-cad-key-cad-kay-eye-cad/Maple IDE 0.0.4http://leaflabs.com//2010/06/maple-ide-004/<p>We're working to improve the IDE, unkink the kinks, and support the unsupported as quickly as possible and have been pushing a lot of new builds. The current version is 0.0.4. In this version we have modified (slightly) the reset-over-serial sequence that should do away with a lot of the extraneous RXTX errors and perhaps allow you to reduce your programDelay setting in the preferences. Most users report consistently successful builds with programDelay set between 600 and 1200. We changed the default setting to 1200, but if you have installed the ide before, youll need to manually change this parameter from the file menu, since your existing preferences take precedence.</p> <p>We're close to having a Mac OSx build for both 64 and 32 bit machines, the blocking issues now are testing and some modifications to the build for arm-gcc. If you have arm-gcc working in Leapord or Snow Leapord, let us know!</p> <p>We've also been cleaning up error reporting, the examples repo, and the serial port menu (linking ttyACMx with ttySx in linux is no longer required). We've been crunching through our tickets and will continue to release builds at a near-nightly pace.</p> <p>In other news, we got proof of assembly on our next batch of Maples, they should be here shortly. We're simultaneously excited and irked that we ran out of stock so quickly last week, but we have way more on the way! For those of you who hate paypal (we understand) or would rather avoid international shipping, we're working on getting some distributor options in place and we'll keep you posted. If you are a distributor, drop us a line!</p> <p>Thanks all for now. Let us know how its going and tell us about your projects/plans!</p>poslathianWed, 02 Jun 2010 14:43:00 +0000tag:leaflabs.com,2010-06-02:/2010/06/maple-ide-004/Cubicles and Leopards and Cliches, Oh My!http://leaflabs.com//2010/05/cubicles-and-leopards-and-cliches-oh-my/<p>What a week! We've finished finals, shipped out Maples all over the world, moved into a new office space, saw tons of gadgets, and lived to blog about it.</p> <p>First off, it sounds like some people are having trouble getting the IDE working with their new boards. We've put board sales on hold until we fix some issues and will be posting progress and snapshot releases in the forums over the next couple days. Once things are smooth we'll put our remaining 15 boards on sale; another batch of 250 are just finishing assembly and should be on their way to us any day, hopefully there won't be any gaps in  availability!</p> <p>Second, good news for those with a rev1 board and an FTDI chip! We've successfuly flashed the newer (rev3) bootloader over the ST hardware serial bootloader by applying voltage straight to the appropriate pin on the  microcontroller. It's easier than it sounds, check out <a href="http://forums.leaflabs.com/topic.php?id=32#post-126">this forum post</a> for directions and a photo. If you have trouble we'd be happy to reflash your  board if you pay for half the shipping (we can make a house call in the Boston, MA area!).</p> <p>Another hanging chad is Mac OSX support for the IDE. The blocking issue right now is the tangled heirarchy of <a href="http://en.wikipedia.org/wiki/Cross_compiler#Canadian_Cross">cross compiling a cross compiler</a> that will run on both 32bit and 64bit versions of Snow Leopard and actually generate properly linked binaries for the Maple... we've spent a lot of time playing with <a href="http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/lipo.1.html%20">fat binaries</a> and have had tons of partial success using automated build scripts, but it's going to take one more all-nighter to cook up the right magic make sauce.</p> <p><img class="aligncenter size-large wp-image-996" title="IMG_4098" src="/static/images/old/2010/05/IMG_4098-770x513.jpg" alt="" width="770" height="513" /></p> <p>Maker Faire was last weekend and I had a great time running around the Bay Area checking out open hardware genetics hardware (<a href="http://www.flickr.com/photos/48069758@N08/4647944209/">OpenPCR</a>), a sweet <a href="http://www.flickr.com/photos/48069758@N08/4647944205/">DIY Liquid Nitrogen rig</a>, <a href="http://www.flickr.com/photos/48069758@N08/4647963653/">quadrotor drones</a>, and <a href="http://www.instructables.com/id/The-Free-Yacht-Saga/">libre yachts</a>. Lots and lots of great projects out there, i'm really excited to see what kind of real time audio effects can be pulled off with a Maple, and to do some crazy helo tricks with all the processing done with an on-board Oak.</p> <p><img class="aligncenter size-large wp-image-997" title="techcity" src="/static/images/old/2010/05/techcity-770x513.jpg" alt="" width="770" height="513" /></p> <p>And finally, look at that hansome fellow in the snazzy new office space! We're the first tenants in an awesome new tech incubation/business/work space in Cambridge called <a href="http://www.technologycity.net">Technology City</a>. We've finally got room for all our electrical equipment and won't have to pull cat hair out of our USB ports or explain our solder paste rig to a skeptical landlord ever again! If you or anybody you know is looking for office or desk space in the Central Square area have them shoot us an email, we're hoping to fill the building with other like minded groups. There's even a nice conference room where we can host community events and meetups!</p>bnewboldSun, 30 May 2010 14:00:00 +0000tag:leaflabs.com,2010-05-30:/2010/05/cubicles-and-leopards-and-cliches-oh-my/Maple rev3 on Sale and In Stock Now (hooray!)http://leaflabs.com//2010/05/maple-r3-on-sale-and-in-stock-now-hooray/<p>After far too long a wait, Maple is back on sale! You can buy it from us <a href="http://leaflabs.com/store/">here</a> for the low, low price of $49.99.</p> <p>We've spent the last few months toiling tirelessly to get Maple Rev. 3 out the door, and the day has finally arrived. This release marks drastic redesigns of both the Maple hardware itself, as well as the software toolchain, based on feedback from our first limited run of boards. The most notable updates include our snazzy new low-noise four-layer PCB design, and a new version of a bootloader that should make it easier to get Maple up and running on a wider variety of platforms. We've also added support for the in circuit serial programmer, now you can install bootloader updates without any fancy hardware. libmaple has also been completely redesigned and now includes such goodies as hardware SPI and I2C. The IDE has been fully tested on Windows and Linux (32 bit), and in the coming weeks we should be bringing it up to speed on other platforms.</p> <p>If you have an original board and want the new bootloader, you can get it from our <a href="http://github.com/leaflabs">repository</a>. Of course, if you don't have the necessary JTAG dongle you can send it back to us and well re-flash it for you! Just get it to us and well pay to send it back.</p> <p>We know you've all been waiting for Maple for a really long time, and we can't express how much we appreciate your continued interest and support for this project. We can't wait to see what you guys build.</p> <p>Over coming days and weeks well be showing off some of things we've been using Maple's extra clock cycles for. Perhaps there are even more of these cycles<a href="http://forums.leaflabs.com/topic.php?id=31">than we originally thought.</a></p> <p>Finally I'm pleased to congratulate two members of our team for picking up some sheepskins (degrees) and another who will be going back to school for yet another one.</p> <p>iperry takes sweet pics:</p> <p><center> <a rel="attachment wp-att-960" href="http://leaflabs.com/2010/05/maple-r3-on-sale-and-in-stock-now-hooray/maple-r3-2-2/"><img class="alignnone size-medium wp-image-960" title="maple-r3-2" src="/static/images/old/2010/05/maple-r3-21-300x200.jpg" alt="" width="300" height="200" /></a><a rel="attachment wp-att-959" href="http://leaflabs.com/2010/05/maple-r3-on-sale-and-in-stock-now-hooray/maple-r3-1-2/"><img class="alignnone size-medium wp-image-959" title="maple-r3-1" src="/static/images/old/2010/05/maple-r3-11-300x199.jpg" alt="" width="300" height="199" /></a> </center></p> <p>(uhh d300 obviously, no canon here)</p>poslathianSun, 23 May 2010 00:01:00 +0000tag:leaflabs.com,2010-05-23:/2010/05/maple-r3-on-sale-and-in-stock-now-hooray/New Digs!http://leaflabs.com//2010/05/new-digs/<p style="text-align: center;"><a title="messy cables" rel="attachment wp-att-875" href="http://leaflabs.com/2010/05/new-digs/pdont_touch/"></a></p> <p><a href="http://www.sysadminday.com/horrors.html"><img class="aligncenter size-full wp-image-875" title="messy cables" src="/static/images/old/2010/05/pDont_Touch.jpg" alt="from sysadminday.com" width="600" height="406" /></a></p></p> <p>If you're reading this our new web server must be working! Today we've transfered the leaflabs.com DNS records over, including all of our email, web applications, documentation, etc. There are definitely a couple rough edges and it might take a couple hours for the changes to propagate, but hopefully things will be snappier and cleaner now. We're even (partially) <a href="http://www.ipv6.org/">IPv6</a> compatible, thanks to a tunnel from <a href="http://www.he.net/">Hurricane Electric</a>.</p> <p>We've imported all the old comments and <a href="http://forums.leaflabs.com">forum</a> posts. You now have the option to use a valid <a href="http://openid.net/what">OpenID</a> to post blog comments, but that didn't work smoothly for the forums so you'll need to register a new account there. Sorry!</p> <p>We've added a <a href="/docs/">documentation</a> section, a <a href="/community/">community page</a>, consolidated information about our <a href="/licensing/">licensing</a>, and more. Let us know if you find any bugs or broken links!</p>bnewboldSun, 16 May 2010 18:09:00 +0000tag:leaflabs.com,2010-05-16:/2010/05/new-digs/Big Pair of Dockshttp://leaflabs.com//2010/05/big-pair-of-docks/<p>I've been clickity clacking away on a new website and documentation; you can see a draft of the documentation (via the great github pages feature) <a href="http://leaflabs.github.com/maple-ide/build/shared/reference/">here</a>.</p> <p>We've got a batch of boards back and want to get them on sale as soon as possible! We had one last minor error which was placing 6v voltage regulators and input capacitors instead of the spec'd 16v (for 18v tolerance after a 2v diode drop). We decided to swap out the parts by hand instead of shipping incorrect boards. The risk is that we would damage the board while doing the solder rework, but we've been pretty careful and will run tests before sending anything off.</p> <p>The last hurdle before these boards go on sale is polishing up the new bootloader: "newboot". We changed the way the DFU bootloader and USB-Serial code interact; previously the bootloader configured serial emulation during startup and left it around for usercode to take advantage of, now the usercode will have to reconfigure the USB peripheral. We made the change so the Maple would be more cross-platform compatible, but it also cleans up our code and should make it clearer how to program the device to act as alternative USB devices. One downside is that uploading from the command line is a little trickier; a special serial command has to be sent to initiate auto-reset.</p> <p>People with rev1 Maple boards (with the "oldboot" bootloader) will have a number of options. Very soon now we'll release a stable version of the IDE compatible with the old bootloader that should work on most platforms. If you would like to upgrade to the new bootloader and you have a compatible JTAG device, you can ask us for the appropriate BIN file (or just grab <a href="http://github.com/leaflabs/maple-bootloader/tree/newboot">the source</a>and compile it yourself). Lastly, you could ship us back the device and we'll reflash it for you... or if you're in the Cambridge, MA area we can probably make a house call by bike!</p>bnewboldMon, 10 May 2010 18:00:00 +0000tag:leaflabs.com,2010-05-10:/2010/05/big-pair-of-docks/Linkdumphttp://leaflabs.com//2010/04/linkdump/<p>Here are some recent top links from around the office... mostly old but maybe new to you!</p> <ul> <li><a href="http://www.linusakesson.net/scene/craft/">Craft VGA Demo</a>: running off an ATmega88</li> <li><a href="http://www.rickard.gunee.com/projects/video/pic/howto.php">Rickard's PIC16C84 PONG</a></li> <li><a href="http://code.rancidbacon.com/LearningAboutArduinoVNC">Arduino VNC</a></li> <li><a href="http://graphics.stanford.edu/~seander/bithacks.html">Bit Twiddling Hacks</a></li> <li><a href="http://vim.wikia.com/wiki/Deleting_a_buffer_without_closing_the_window">Deleting a buffer without closing the window</a> (vim)</li> <li><a href="http://www.eetimes.com/news/semi/showArticle.jhtml?articleID=224600583">Xilinx puts ARM core into its FPGAs</a>: Dual A9s; this will be the $$$ version of Oak in "early 2011"</li> <li><a href="http://www.quicklycode.com/cheatsheets/arduino-cheat-sheet">Arduino Cheatsheet</a></li> <li><a href="http://www.ulogic.org/trac">DEBIT</a>: FPGA hacking</li> <li><a href="http://eagain.net/articles/git-for-computer-scientists/">git for computer scientists</a></li> <li><a href="http://nesl.ee.ucla.edu/fw/thomas/thomas_project_report.pdf">GNU Radio 802.15.4 En- and Decoding</a> (450kb pdf)</li> <li><a href="http://greenarraychips.com/">greenarraychips.com</a>: custom silicon, reminds me of Thinking Machines</li> <li><a href="www.sfu.ca/chaos/papers/rmp_reprint05.pdf">Feedback for physicists: A tutorial essay on control</a></li> <li><a href="http://suckless.org/">suckless.org</a>: nice small software</li> <li><a href="http://www.ettus.com/ni">Ettus Research Purchased by National Instruments</a>: we really want a USRP to play with!</li> <li><a href="http://willowgarage.com">willowgarage.com</a>: nice bots</li> <li><a href="http://www.nordicsemi.com/index.cfm?obj=product&amp;act=display&amp;pro=89">nRF24L01- Single Chip 2.4GHz Transceiver</a> (via <a href="http://tzechienchu.typepad.com/tc_chus_point/">tzechienchu</a>, thanks!)</li> <li><a href="http://www.botjunkie.com/2010/04/27/robogames-2010-mech-warfare/">RoboGames 2010 Mech Warfare</a> via BotJunkie</li> </ul> <p>... and now my yak is cold</p>bnewboldThu, 29 Apr 2010 12:01:00 +0000tag:leaflabs.com,2010-04-29:/2010/04/linkdump/Leaves Love Spring!http://leaflabs.com//2010/04/leaves-love-spring/<p>We've been bursting forth with code and hardware as the weather improves but have neglected to share them with you despite many emails and conversations; thanks for all your interest!</p> <p><center> <img alt="maple rev3" src="/static/images/old/img_4044-Modified-300x207.jpg" title="maple rev3" /> </center></p> <p>On the top of our stack is the next batch of Maple boards, rev3. We've got a small production batch back for testing and will have boards for sale as soon as the full run comes back from assembly. We're toiling away on stable versions of our bootloader, low level library, and arduino-based IDE to be released at the same time as these boards go on sale; you can track our development on <a href="http://github.com/leaflabs/">github</a> and we look forward to your comments and critique as once the dust settles. We've also got a <a href="http://www.flickr.com/photos/48069758@N08/4556431364/">shiny new website</a> and fancy documentation in the pipeline.</p> <p>We spent a whole day this past week testing the Maple rev3. The biggest fixed issue is noise, both crosstalk between headers and digital noise from the USB bus. The USB noise is still <a href="http://www.flickr.com/photos/48069758@N08/4555765513/">detectable</a>, while the crosstalk has virtually disappeared on most pins. We're collecting hard numbers on our actual ADC (analog voltage measurement) precision and accuracy; in theory we could get 12-bit resolution over the 0-3.3v range but most development boards have trouble meeting the full potential of their parts. We'll report back once we're more confident of our test setup and peripheral configuration, but it looks pretty reasonable.</p> <p><center> <img alt="test-prog-shot" src="/static/images/old/test-prog-shot.png" title="test-prog-shot" /> </center></p> <p>As part of the testing process I wrote up an interactive testing program which acts as a console over one of the USART serial ports and has commands to read in GPIO status, spit out servo-compatible PWM sweeps, dump data over the USB connection, etc. We're thinking of including this as the default program on the rev3 Maples, what do you think? Should we make the interface over USB instead of USART? You can look at what we have now <a href="http://gist.github.com/380091">here</a>. In the future we're excited to see if we can port more complete environments like <a href="http://www.eluaproject.net/">eLua</a> or <a href="http://code.google.com/p/python-on-a-chip/">python-on-a-chip</a>.</p> <p><center> <img alt="Breadboarding PWM audio with the Maple" src="/static/images/old/audio_board-300x225.jpg" title="audio_breadboard" /></p> <p>Breadboarding PWM audio with the Maple </center></p> <p>One use for high resolution ADC sampling is real time audio work! With the right low pass filter (which can be just a couple resistors and capacitors) the high speed PWM ports on the Maple can pump out reasonable audio-frequency waveforms. okie has been working on a basic audio shield with nice active filters and other goodies.</p> <p><center> <img alt="Basic Audio Shield Prototype" src="/static/images/old/img_4043-Modified-300x224.jpg" title="Basic Audio Shield Prototype" /> </center></p> <p>Of course a dedicated DAC could give much higher audio fidelity, and many microcontrollers can implement basic audio synthesis. We're experimenting with some more computationally intensive frequency domain effects and are planning on building a more fancy professional grade audio shield for the Maple Native... the delux version of the Maple with a larger header configuration and more features, which we're now prototyping. Jess has been using an open source tool (<a href="http://kicad.sourceforge.net/wiki/index.php/Main_Page">Kicad</a>) to do the design and layout for the Maple Native and she'll be posting about that experience soon.</p> <p>There's more going on; check out our <a href="http://www.flickr.com/photos/48069758@N08/">flicker stream</a> for more photos of testing, a <a href="http://www.flickr.com/photos/48069758@N08/4515845564/">MIDI/IR theramin</a>, <a href="http://www.flickr.com/photos/48069758@N08/4555765533/">wifi routers</a>, and a <a href="http://www.flickr.com/photos/48069758@N08/4555765513/">ghost</a> from our past soon to be reincarnated.</p>bnewboldMon, 26 Apr 2010 23:59:00 +0000tag:leaflabs.com,2010-04-26:/2010/04/leaves-love-spring/the state of the maple treehttp://leaflabs.com//2010/02/the-state-of-the-maple-tree/<p>Hi everyone! As you can probably tell from okie's awesome picture in the post below, we got back the prototypes for Maple Rev2 about a week ago. You may recall that the revisions were to fix two issues. The first is that the I/O has been relabeled in a format we think makes more sense for use with the STM32 – the pins are no longer divided into analog and digital banks, although we've made sure the pins in those locations have those capabilities to maintain Arduino compatibility. Maple pins are now numbered from 0 to 43 have have labels on each pin indicating its capabilities (don't worry, the library will still support the numbering scheme from Rev1) like PWM, AIN for analog input, TX1, RX1 for Serial1 port (there are 3 total), and the pins in all the SPI and I2C buses.</p> <p><center> <img src="/static/images/old/dropbox/maple-v25-front.png" width="300px;"> <img src="/static/images/old/dropbox/maple-v25-back.png" width="300px;"> </center></p> <p>The second issue to fix in this revision was slightly more serious. We had encountered a pretty significant voltage swing on VCC – a sawtooth that was up to 1.5 V peak-to-peak, with no code running on the chip, depending on the power source used. The digital I/O worked fine even with the variation, but we shipped the Rev1 boards with a 10 uF through-hole bypass cap that was intended to knock out the swing for those of you working on analog projects. Rev2 incorporated an extra 10 uF bypass into the design.</p> <p>We got the boards back and the extra bypass seemed to do a pretty impressive job of knocking out the swing, dropping it down to baseline max 70 mV versus the aforementioned 1.5 V.* Still, it's just not quite as good as we would like. We're still seeing spikes on VCC of up to 300 mV when pulling on some of the peripherals (especially USB). And the twelve-bit ADCs, which we've all been really excited about using, are losing up to six bits of resolution with some combinations of peripherals turned on.</p> <p>This isn't totally unexpected -- several of the other STM32 dev boards we tested are similarly noisy. Even so, we're really just not satisfied with these results, and after a lot of experimenting and deliberation, we realized we really just couldn't get the clean signals with a two layer board. Because of this, we've decided to switch to a four layer board. The next revision of Maple will have dedicated ground and power planes, which should (we hope!) solve all of our noise problems.</p> <p>Of course (bet you saw this coming, didn't you?), what this means for you is that the next revision of Maples will be shipping out about one to two weeks later than we hoped for. This means, ultra best case scenario, the new Maples will be shipping around March 10, and ultra worst case scenario, around December 2040, considering what good luck we had with production last time. Okay, just kidding – medium worst case scenario would probably be sometime around March 31.</p> <p>okie has been working tirelessly on the new four layer design, and it is nearly finished, so we should have prototypes back within a week. Once those are back and tested, we will be sending them to production, and at that time (probably around February 23) we will once again be taking pre-orders!</p> <p>We've been getting a lot of really wonderful feedback on the Rev1 boards, and a lot of interest in Rev2. For those of you who have been waiting for a Rev2, we really are truly sorry for the added delay and inconvenience. We just hope you guys are willing to stick with us a little longer, and that you understand our desire to avoid sending out a product that's not 100% as sweet as it could be. Thanks for being so awesome, everyone.</p> <p><strong>Maple is switching to a four layer board to solve some lingering noise issues, and so will be one or two weeks behind schedule – we're really sorry for the delay!</strong></p> <p>*OK, that isn't 100% true. I mean, it is, but that's not what happened right away. Here's the entire sordid story for the interested, edited out above for clarity's sake: we got the boards back and were STILL seeing, baseline with no code on the board, a sawtooth of about 300 mV, despite the bypass. </p> <p><center> <img alt="maple-r1-VCC-nocap" src="/static/images/old/maple-r1-VCC-nocap-150x150.jpg" title="maple-r1-VCC-nocap" /> <img alt="maple-r1-VCC-ceramic10uF" src="/static/images/old/maple-r1-VCC-ceramic10uF-150x150.jpg" title="maple-r1-VCC-ceramic10uF" /> </center></p> <p>We were like WTF? So we did a ridiculous amount of tests, and at some point we dumped ANOTHER bypass on the header (a la our impromptu fix for Rev1), and it was fixed. Again we were like WTF? So after lots of digging we eventually realized that the voltage regulator we're using expected a bypass with a certain equivalent series resistance. The bypass we'd added to the design was ceramic – very little ESR. The one we'd been putting in the header was aluminum electrolytic – plenty of ESR. OH. So we replaced the ceramic one with an electrolytic one and voila, the results detailed above.</p> <p><center> <img alt="maple-r1-VCC-electrolytic10uF" src="/static/images/old/maple-r1-VCC-electrolytic10uF-150x150.jpg" title="maple-r1-VCC-electrolytic10uF" /> </center></p> <p>We share this story with you just in case you ever come across a similar problem and are like WTF?, you might learn from our travails.</p>jessbSun, 14 Feb 2010 00:39:00 +0000tag:leaflabs.com,2010-02-14:/2010/02/the-state-of-the-maple-tree/Sneak of Maple V2http://leaflabs.com//2010/02/221-2/<p><center> <img width="700px" src="/static/images/old/maple-v2-proto1-1024x691.jpg" alt="maple-v2-proto"> </center></p> <p>A good story to come... Great things have been brewing. Show us what you've been cooking!</p>okieFri, 05 Feb 2010 02:59:00 +0000tag:leaflabs.com,2010-02-05:/2010/02/221-2/Maple on Mac OS X!http://leaflabs.com//2010/01/maple-on-mac-os-x/<p><center> <img src="/static/images/old/maplepic-1024x640.jpg" width="700px;"> </center></p> <p>With revision 115, the maple IDE works on OS X 10.5, provided you use an external power source (due to the dfu problems mentioned above. To build it, make sure you have developer tools installed. There is an external dependency on two GNU libraries, gmp and mpfr. These can be obtained through macports.</p> <p>First, go to <a href="http://www.macports.org/" title="http://www.macports.org/">http://www.macports.org/</a> and follow the installation instructions. Then open a terminal and type</p> <div class="codehilite"><pre><span class="n">sudo</span> <span class="n">port</span> <span class="n">install</span> <span class="n">mpfr</span> </pre></div> <p>This should install libgmp and libmpfr. Next, check out the code repository at  <strike><a href="http://code.google.com/p/leaflabs" title="http://code.google.com/p/leaflabs">http://code.google.com/p/leaflabs</a></strike> <a href="http://github.com/leaflabs">github</a>.</p> <p>open up a terminal, change to the directory</p> <div class="codehilite"><pre><span class="n">leaflabs</span><span class="o">/</span><span class="n">trunk</span><span class="o">/</span><span class="n">maple</span><span class="o">/</span><span class="n">build</span><span class="o">/</span><span class="n">macosx</span> </pre></div> <p>and then run appbuild.sh</p> <p>this will create the application for you and place it into the work directory ready for use.</p> <p>To flash code, first set the board to maple, and make sure your maple is powered externally or via battery. The first time you try to flash, things will hang up at "Claiming USB DFU Interface...". When this happens, unplug the usb cable and plug it back in. When you next click upload, everything should work. Ive got mine sitting here blinking right now.</p> <p>Additionally, the serial monitor works under mac. It should set itself up automatically, but if not, once your code is running go to the tools->serial port menu and select something like "/dev/tty.usbmodem411".</p> <p>Hope this works for you all. A pre-built app should be available on the website shortly.</p> <p>Unfortunately, it seems that there are problems getting libmpfr to play nicely with Snow Leopard (OS X 10.6). We're currently looking into this, and will let you know when we have  a fix.</p>bbradlynWed, 13 Jan 2010 22:12:00 +0000tag:leaflabs.com,2010-01-13:/2010/01/maple-on-mac-os-x/Blinky!!http://leaflabs.com//2009/12/blinky/<p>Happy Holidays Everyone!</p> <p>We have gotten reports that Maple's are being delivered and several users have successfully gotten Blinky style programs running from the IDE. This is great news! Here is a short update.</p> <p>We are currently working on a getting started guide, detailing how to build/install the IDE and use it to program Maple. This being the Holiday weekend, the timing could have been better, but we hope to have this tutorial up late Tuesday evening. After a bit of turbulence with a broken repository, we have migrated the latest changes to the library into the IDE and it builds successfully on linux and windows. Unfortunately, there remains an issue on mac OSX involving dfu-util, the program used to load new firmware onto the STM32.</p> <p>Support for using Serial.print() to write to the UART ports is complete, however this function does not mirror the data to the USB port (which acts as a virtual serial port on the host machine). This functionality exists, but hasn't been integrated into the library yet.</p> <p>We are working to integrate the various dependencies of the IDE into simple installers on windows and linux, hopefully this will be completed in the next few days. For now, however, the IDE can be built manually from the repository at leaflabs.googlecode.com, following the standard instructions on arduino.cc (for building the IDE). In addition, the IDE depends on dfu-util, which can be obtained through most package repositories for linux or from openmoko.org.</p> <p>Thank you for your patience and support, we hope you enjoy getting started with your new Maple. Please do check on the website later this week for further updates about installers and the getting started guide. We look forward to your feedback!</p>poslathianMon, 28 Dec 2009 18:13:00 +0000tag:leaflabs.com,2009-12-28:/2009/12/blinky/Maples Shipped!http://leaflabs.com//2009/12/maples-shipped/<p>Hey all--</p> <p>Maples are in the mail; hopefully they will arrive this weekend for you residents of America out there, and some time next week for the international folks. Our software will be up within the next few days, just in time to get started hacking on your boards.</p> <p><center> <img src="/static/images/old/DSC_83091-678x1024.jpg" alt="Our very own Jewish santa" width="300px"></p> <p>Our very own Jewish Santa, shipping Maples to all the good boys and girls. </center></p> <p>So thanks for bearing with us, and Merry Christmas, Happy Hanukkah, Killer Kwanzaa, and A yuley Yule to all of you.</p>HadleyWed, 23 Dec 2009 17:26:00 +0000tag:leaflabs.com,2009-12-23:/2009/12/maples-shipped/The First Twohttp://leaflabs.com//2009/12/the-first-two/<p><center> <img src="/static/images/old/maple-assm-top2-1024x568.jpg" alt="maple-assm-top2" width="700px"> </center></p> <p>We'll hopefully be shipping the pre-orders the end of next week.</p>okieWed, 02 Dec 2009 03:38:00 +0000tag:leaflabs.com,2009-12-02:/2009/12/the-first-two/Maple before assemblyhttp://leaflabs.com//2009/11/187/<p>Here's a picture of some Maple boards a couple days ago before assembly. Oh my gosh I'm so excited too!</p> <p><center> <img src="/static/images/old/mapleinproduction-1024x768.jpg" alt="mapleinproduction" width="700px"> </center></p> <p>Evidence that at least one component has been placed on one board:</p> <p><center> <img src="/static/images/old/batterycharger-300x209.jpg" alt="batterycharger"> </center></p>okieSat, 21 Nov 2009 11:00:00 +0000tag:leaflabs.com,2009-11-21:/2009/11/187/FINALLY some assembly!http://leaflabs.com//2009/11/finally-some-assembly/<p>In the middle of October we shipped the Maple components off to Gold Pheonix for assembly. It was an exciting day and we could hardly wait the two weeks to see the finished product. As we tracked our package across the world our excitement turned to panic. The components spent a few stagnant days in customs - I naively called this "customs glitch." Days turned to weeks, our 15 day turnaround went from a plan to a fantasy to an impossibility. However, I am pleased to copy below the update i posted on the home page:</p> <p><strong></p> <p>After a VERY long stint in customs, Gold Pheonix has FINALLY received the components for assembly [sometime between friday afternoon and monday morning]. We expect a one week turn around on this. We had originally allocated 15 days lead time for manufacturing our first run of 100 Maples - due to bureaucratic overhead and some naivete on our part, 15 days proved to be a massive underestimate. However, were are pleased to learn that the first run of Maple's are currently under the pick and place being assembled!. We offer our sincerest apologies for the delay. To those who have contacted us directly about this issue, thanks for your understanding and support! </strong></p>poslathianTue, 17 Nov 2009 04:56:00 +0000tag:leaflabs.com,2009-11-17:/2009/11/finally-some-assembly/Yeah, Yeah, its coming...http://leaflabs.com//2009/11/yeah-yeah-its-coming/<p>Silly customs glitched our release timing going on 9 days now! ugh! We've been using the extra days to polish up the arduino-port. The principle hiccups have been portability on mac/linux/windows. We usually play in linux, so thats the trivial build. However, Maple depends on dfu-util (from openMoko) and arm-eabi-gcc (codesourcery) and getting these to play nice on the other platforms has been headache. Fear not, all will be righted in the coming days. Were sorry for the delay, the second we've got a base application for you to play with were going to open it up to the open source community to hack on. For now, its just a smash-up of arduino and our stm32 build environment, but we hope that together we can make it oh so much more!</p> <p>Obligatory Screenshot:</p> <p><center> <img src="/static/images/old/screenshot1-1024x562.jpg" width="700px"> </center></p>poslathianMon, 09 Nov 2009 03:27:00 +0000tag:leaflabs.com,2009-11-09:/2009/11/yeah-yeah-its-coming/What's the deal with pre-ordering?http://leaflabs.com//2009/10/whats-the-deal-with-pre-ordering/<p>Some of you may have noticed that there has been a store page flickering on and off on our blog. Yes, it's pre-order season.</p> <p>We had a few kinks left with paypal, but they should be straightened and now you can pre-order your very own Maple! But why, you may ask?</p> <p>Well, most relevant to you, we are only getting 100 boards on this first run. If you really want a Maple you might want to pre-order. You'll get the board at the same time and not risk them selling out. Also, we are really interested in gauging the interest in this first round of Maple, and we figured the number of pre-orders and how fast the boards sell would be a decent proxy.  This kind of info will be a factor in deciding how many to run for the next run of Maple and Maple Native.</p> <p>Also, if you've tried to pre-order a board and paypal told you it was sold out.... paypal lied. Now that things are worked out, you should be able to pre-order a board <a href="http://leaflabs.com/store">here</a>.</p> <p>PS. For waiting so nicely, here's a pretty picture of the old prototype:</p> <p><img src="http://leaflabs.com/img/wiki_up/DSC_0456.jpg"></p> <p>(The release version differs in that power selection is made using a jumper, between standard barrel jack / USB power / LiPo batter, there is a larger external header to connect to all the external I/O pins not used by the Arduino pin-compatible layout and minor changes have been made to the silkscreen and layout.)</p> <p>okie edit:</p> <p>Here's a picture of the third (we care a lot  about getting it right) prototype for Maple. It has no soldermask or silkscreen because these barebones PCBs are cheap and <a href="http://www.4pcb.com">Advanced Circuits</a> ships them the next day. The layout on this one is a lot better than the one in the picture above. The traces have more direct routes, the microcontroller is closer to the pins in the Analog section so that those trace lengths are minimized, and those traces are also farther apart to minimize crosstalk. The LiPo/Li-Ion battery charger on the board seems to work well. I've been repeatedly charging and discharging a LiPo battery. It charges it from nearly completely dead in about 20 minutes. A red LED means that a battery is connected and is charging, which you can do by USB power, a wall adapter, or another DC power source greater than 5V. When the battery is charged, a green LED comes on. The charging component is pretty smart in measuring the battery and determining when and how to charge it. It's probably used in cell phones, media players, etc.</p> <p><center> <img src="/static/images/old/maple_barebones-768x1024.jpg" alt="maple_barebones" width="300px"> </center></p> <p><center> <img alt="red-maple-tree" src="/static/images/old/red-maple-tree-150x150.jpg" title="red-maple-tree" /> </center></p> <p>The components on the boards that are going out for preorders are machine placed. The pads are gold plated. The soldermask is <span style="color: #ff0000;"><strong>deep red</strong></span> like the leaves of a maple tree in the late fall. There aren't a lot of things much better than working with beautiful hardware on a crispy cool fall night.</p> <p>Here's a screen capture of it:</p> <p><center> <img alt="maple_eaglecapture" src="/static/images/old/maple_eaglecapture-1024x921.png" width="300px"> </center></p> <p>This also has alternate header pads that are in standard 0.1" spacing with the other headers for those who also like perf board.</p>HadleyThu, 15 Oct 2009 20:13:00 +0000tag:leaflabs.com,2009-10-15:/2009/10/whats-the-deal-with-pre-ordering/LeafLabs Newsletterhttp://leaflabs.com//2009/10/leaflabs-newsletter/<p>A few weeks ago I sent out the inaugural LeafLabs newsletter. For anyone not on our mailing list, here's a copy of the text:</p> <hr> <p><em>Hello!</em></p> <p><em>This is the first ever LeafLabs newsletter. We're going to take the opportunity to sully this historical first with logistics, outlining exactly what we hope these emails will accomplish and what infrastructures we currently have established to help maintain a thriving community.</em></p> <p><strong><em>The Newsletter</em></strong></p> <p><em>In the future we hope this newsletter will contain exciting monthly updates from the actual Leaf Labs-- news regarding product releases, software updates, new features on the website etc. We hope also that this newsletter will be a place to highlight cool projects with Leaf boards, developed both in house and by users.</em></p> <p><strong><em>The Infastructure</em></strong></p> <p><em>We begin our tour at the newly launched website, <a href="http://leaflabs.com">leaflabs.com</a>. You may notice it looks a little sparse, but we're excited about integrating more features as development progresses. You may want to register on our website; currently registering allows you to sign up for our mailing lists and little else, but in the near future you will be able to preorder boards, participate in forums, sign up to be a beta tester, post projects and a variety of web associated activities. LeafLabs also has a twitter (@leaflabs) and a blog (leaflabs.com) Finally, if you want to chat about all things Leaf (oh and we know you do), come check out our IRC channel, #leafblowers on irc.freenode.net.</em></p> <p><strong><em>Maple Release</em></strong></p> <p><em>The major update for this incarnation of the Leaf newsletter is the upcoming release of Maple! On October 15th you will be able to pre-order your boards on our website, and on Halloween they will be available via our website and in the future, distributers like Sparkfun.com. Get excited, we know we are.</em></p> <p><em>So concludes your first official correspondence from LeafLabs. Was it as good for you as it was for us?</em></p> <p><em>Until next time,</em></p> <p><em>The LeafLabs Team</em></p> <hr> <p>As an astute reader may have noticed, the pre-release date for Maple is today!! Order your very own maple <a href="http://leaflabs.com/store">here</a>. If you’d like to be added to the newsletter, send us a line at info (at) leaflabs (dot) com or make a request via comments.</p>HadleyThu, 15 Oct 2009 14:15:00 +0000tag:leaflabs.com,2009-10-15:/2009/10/leaflabs-newsletter/New Lab Equipment!http://leaflabs.com//2009/09/new-lab-equipment/<p><center> <img src="/static/images/old/leaflabssolderstation-small1-1024x680.jpg" alt="leaflabssolderstation" width="700px"> </center></p> <p>This weekend, we set up a microscope, solder paste machine, an oven, and an air compressor. They're all in this photo. I'm really excited about having the solder paste machine. The first time I tried one, it was as exciting as seeing solder wick onto component leads for the first time (which was immensely exciting). They make soldering high-pin-count components cleaner and easier. We needed the air compressor for the solder paste machine, but we'll use it for other things too. I'll be assembling the final version of the Maple prototype here this week before we get a pick-and-placed proof and 100 assembled boards for beta testers.</p> <p>This is our new cat, Henry.</p> <p><img alt="henry" src="/static/images/old/henry-225x300.jpg" title="henry" /></p>okieMon, 21 Sep 2009 01:08:00 +0000tag:leaflabs.com,2009-09-21:/2009/09/new-lab-equipment/Maple Prototype Details and Mailing Listhttp://leaflabs.com//2009/08/maple-prototype-details-and-mailing-list/<p>For those of you who were asking, the current iteration of the Maple prototype is using an <a href="http://www.st.com/mcu/modules.php?name=mcu&amp;file=devicedocs&amp;DEV=STM32F103RB">STM32 ARM Cortex-M3 processor</a> with <strike>256KB</strike> 128K flash memory, <strike>8KB</strike> 20KB of RAM.</p> <p>We're currently on vacation, so expect a bit of radio silence until next week. Those of you who have requested to be added to our mailing list will soon start receiving our newsletter which will include details about upcoming hardware and software releases and be sent out about once a month. If you'd like to be added to the mailing list, please do so by filling in your email address at the bottom of our main page at http://leaflabs.com (more content there in a bit). More news soon!</p>drewsWed, 26 Aug 2009 23:46:00 +0000tag:leaflabs.com,2009-08-26:/2009/08/maple-prototype-details-and-mailing-list/Maple Prototypehttp://leaflabs.com//2009/08/maple-prototype/<p><center> <img src="/static/images/old/mapleproto.jpg" alt="mapleproto" width="400px"> </center></p> <p>This is the Maple prototype, our first version of an Arduino-compatible board with an STM32 ARM Cortex-M3 processor. We're chomping at the bits to release it as soon as we tie up a couple loose ends to make it what we think it should be. We've ported all the Arduino language and are modifying the Arduino environment so that everything works how it should. Notice that Maple does not have an FTDI chip, so serial communication works through a USB Virtual COM Port that's implemented on the STM32, so it may even be <em>slightly</em> easier to setup than Arduino boards because FTDI drivers aren't required, and the drivers for the Virtual COM Port are probably already on your Mac or Linux machine; for Windows, you'll just use the driver that we include with the software download.</p> <p>We're also extending the Arduino language to allow users to do things with the STM32 that the Atmega chips cannot do such as easy setting up of different types of USB devices (HID for crazy mouses, mass storage, or full speed USB 2.0 data transfer)  and other communication protocols (USART, SPI, I2C, I2S, CAN), providing higher bandwidth capabilities.</p> <p>To allow people an opportunity to experiment with the performance benefits of Maple, we're designing a couple shields to stack on. The one I'm most excited about is the audio shield. I love programming real-time audio synthesis and effects processing algorithms and have experimented with these things on Arduino. Audio processing is one thing that can quickly lead to hitting the limitations of the Arduino AVR processors. I like to simulate real-time audio effects processing with MATLAB (though I'm starting to move to Python) by importing an audio file and writing an algorithm that slides a buffer through the audio data as if it were being captured in real-time from a guitar or something. It's disappointing to create a cool effect that takes too much processing or memory to implement on the embedded hardware you're using, so I can't wait to allow people more flexibility here and for other things. Another shield we might do is an OLED display with a little trackball or joystick. I haven't seen an OLED display shield at a reasonable cost. We're open to suggestions!</p>okieSun, 16 Aug 2009 18:23:00 +0000tag:leaflabs.com,2009-08-16:/2009/08/maple-prototype/vbs.tvhttp://leaflabs.com//2009/07/vbstv/<p>A while back Nadja Oertelt approached us about doing a bit for her show Motherboard on Vice TV. Having seen the show (it's awesome!) we were psyched about the offer. But, we were unfortunately deep into the prototyping phase of project and had little to show. A few all nighters later we had gotten close to getting three demos working:</p> <p>​1) Autonomous hover with a simple linear feedback controller on an RC plane</p> <p>​2) Programmable guitar pedal</p> <p>​3) Simple video processing on board the FPGA</p> <p>If only the VBS crew had showed up a day later, we might have had a lot of neat content ready for them. Of course, even the hardest of all night hackfests isn't enough to bring a fresh board - straight off the soldering iron - to life in such varied, visually compelling ways. At the end of the shoot, all we had to show was the left overs of the weekend devel-o-thon, an RC plane with some not-so-functional electronics, and the prototype boards themselves. Ugh. We were devastated we had messed up this opportunity.</p> <p>The folks over at VBS did an amazing job turning what we did have into a great piece, <a href="http://www.vbs.tv/blog/leaflabs-are-mit-s-finest-fuck-ups">which you should watch here</a>. I love what came out of that footage and we owe a big thanks to Nadja for doing so much with so little. To be honest I was somewhat dreading the piece - a misplaced apprehension. I love it.</p> <p>That said, its a few months and a few prototype revisions later. We have a lot more to show! This time, however, we won't make the mistake of jumping the gun - we can't wait to show off some demos once they're as spit-polished as we'd like. Besides the demo's, however, we've made a ton of improvements on the hardware end of things. We offer the lighter Maple board without the FPGA that is fully arduino compatible. We are really committed to building off the great success of those little boards-in-blue, staying open source and creative commons the whole way! If you like what were up to, drop us a line or sign up for our news letter!</p> <p>info@leaflabs.com</p>poslathianMon, 20 Jul 2009 17:48:00 +0000tag:leaflabs.com,2009-07-20:/2009/07/vbstv/Arduino + Cortex M3 = Maplehttp://leaflabs.com//2009/07/arduino-cortex-m3-maple/<p>In the depths of the sparkfun.com product pages Occam sez: </p> <blockquote> <p>"Exactly ... someone should port the Arduino firmware and environment to a 32-bit ARM, preferably one of the new Cortex-M3 variants. Can anyone say ARMDuino? It would be killer, especially on these very fast ARM processors..."</p> </blockquote> <p>Yes. We agree. Totally.</p> <p>Armed with a cozy basement and some bad techno, arduino+arm+ development environment is pretty much here. Were stitching the pieces together on a project were calling Maple, the first in a line of dev boards that we've designed to shut up those little voices in our heads that keep saying "Wouldn't it be great if you could sketch hardware projects out in an arduino/processing/wiring style environment that do a lot more than blink some lights and run some motors? Audio? Video? Machine Learning? or maybe just...WAY MORE BLINKY LIGHTS.</p> <p>The Arduino ships with a 16MHz Atmega chip that just doesn't cut it for these types of applications. The 72MHz ARM Cortex M3 chips look pretty rad, but you really have to get your hands dirty to use them. That 5x boost in proc speed is worth it though - say hello to audio applications on Arduino. To be fair, I recall playing some awesome Lucas Arts games on an old Pentium I 90MHz machine - strip out the DOS overhead, and let there be an Arduino arcade console. We've made the Maple pinouts and dev library fully arduino compatible so all your old projects and libraries should play nice on the new hardware. Thanks to ST's incarnation of the Cortex M3, Maple supports ACTUAL USB communication, not just serial-over-usb via an ftdi chip. Accelerometer based mouse? USB audio fx processor? A controller for your big 3d printer/latte art plotter project? It turns out you can throw a lot more data over a USB pipe than the old 5600 baud serial line.</p> <p>Of course, Maple is just the first step. To truly get real processing power where in belongs - on top of a pile of other electronics sitting on your workbench - we give you Oak. Oak is essentially the Maple with a Spartan 3e FPGA next door with some extra memory (256MB) and a blue tooth chip. Were building a fully fledged library of HW blocks that let the fpga grab frames from a video camera, drive your monitor or TV, crunch some numbers in parallel for some audio processing and even do some simple object tracking from real time video. Of course, for the verilog-vhdl savvy, everything is open source, go nuts. But we think FPGA's are just great, and they need to get out more. Wed love to give FPGA development that sketch-book feel of arduino hacking.</p> <p>Farther on down the line will be Willow. We're thinking of using an ARM Cortex A8 for this board. Think Arduino - at 1 GHz. Well be throwing a much larger 1.5M gate fpga on Willow, and are dreaming of the first "Linux on Willow!" posts around the internet. All our boards are small and designed to run on-board of your next robotics project, mounted inside of a guitar pedal case,</p> <p>or whatever nifty portable electronic widget you can think of.</p> <p>Most of the expansion modules will be blue-tooth ready, bringing all the cabling and wiring on your next project to a bare minimum. Of course all those great arduino XBee and motor controller shields are still compatible.</p> <p>Did I mention everything is open source?</p> <p>Let us know what you think.</p>poslathianWed, 15 Jul 2009 20:58:00 +0000tag:leaflabs.com,2009-07-15:/2009/07/arduino-cortex-m3-maple/Web Design in Julyhttp://leaflabs.com//2009/07/web-design-in-july/<p>Hey all-</p> <p>This has been the weirdest summer so far. I've been wearing ratty sweatshirts and jeans and wishing for sunny weather. I haven't once cursed the summer gods for the scorching heat; I think they're all on vacation. Ugh. If I wanted London weather I would move there.</p> <p>The [only] good side to cold, moist and otherwise unpleasant weather is all the time you aren't wasting doing frivolous things like being outside and having fun. I've been working coming up with a few potential designs for our website; you can get an idea of them once our new placeholder webpage is up.</p> <p>I've been attempting learn/relearn is HTML/CSS/etc. I'll be upfront: I haven't really touched anything like this since I tricked out my geocities site in middleschool. HTML has actually changed a bit since then.</p> <p>I was talking about this with Barry, and he and I noticed a curious phenomenon; web design, in general, has improved in the past decade or so, despite the increased accessibility of HTML et al. He thinks this can be attributed to the deaths of sites like AOL Hometown [dead], Yahoo Geocities [gone in October] and the like. I think you can thank the rise of web design as a legitimate occupation, even industry. I mean come on... it's one thing to put the same blinking GIF at the bottom of your screen five times; it's another thing to have to articulate to your designer "Now I want three sparkly hearts with glitter animation and then below that a row of winking teddy bears-- what? OF COURSE I WANT THEM ALL EXACTLY THE SAME! WHAT KIND OF DESIGN SCHOOL DID YOU GO TO?"</p> <p>Anyways, enjoy the summer day...</p> <p><img alt="ironicGIF" src="/static/images/old/SUN10.gif" title="ironicGIF" /><img alt="ironicGIF" src="/static/images/old/SUN10.gif" title="ironicGIF" /><img alt="ironicGIF" src="/static/images/old/SUN10.gif" title="ironicGIF" /><img alt="ironicGIF" src="/static/images/old/SUN10.gif" title="ironicGIF" /><img alt="ironicGIF" src="/static/images/old/SUN10.gif" title="ironicGIF" /></p>HadleyMon, 13 Jul 2009 15:00:00 +0000tag:leaflabs.com,2009-07-13:/2009/07/web-design-in-july/Nodebox and getting sickhttp://leaflabs.com//2009/06/nodebox-and-getting-sick/<p><img alt="Potential LeafLabs Logo" src="/static/images/old/leaflabs1.jpg" title="LeafLabs" /></p> <p>So, as you can see, I've been playing with generative graphics. <a href="http://nodebox.net">Nodebox</a> is a pretty sweet, and free, program that I've had time to explore since contracting a series of infections. [sidebar: being sick in the summer is especially lame because who the hell expects to have a sore throat in June?] It's aimed at graphic designers, which is reflected sort of interestingly in the way they present the concepts involved in writing code; I haven't seen "hello world" or "foo" any where in their documentation yet.  Nodebox is python based, so it's extremely intuitive and a really good way to spend your afternoons rather than watching endless blocks of television, and I recommend you all fool around with it at least a little; people have done some really neat things with it.</p> <p>That there was my way of feeling out the program...it has a little bit of everything, code wise: gradients, for loops, randomized values [cool!], curves, text etc. It was fun and it took maybe half an hour, including getting the leaf to look right. Not bad at all.</p> <p><center> <img src="/static/images/old/toolkit1.jpg" alt="toolkit" width="700px"> </center></p> <p>Now here is something a little more interesting.. While I've been sick, I've been playing with a few ideas for the look of our toolkit [AJ and Barry are working with the functionality]..the draft is pretty self explanatory . Edit nodes and node-code [heh] in the center, view outputs of nodes on the right, and we haven't quite worked out what options are going to be available on the left bar, but we're thinking something along the lines of qualitative information about selected nodes.</p> <p>The <strong>really</strong> nice thing about nodebox is it allowed me to write overhead so I could generate each node and its color, shape, etc. easily, and moreover, I imagine this will be very helpful when I begin working with GTK's graphic's library, <a href="http://cairographics.org/">Cairo</a>.</p> <p>I'm planning on doing a few simple animations to demonstrate usage of the program,  and as soon as possible, begin either porting or wrapping what I have for use with what AJ and Barry have been working on. Hopefully AJ will have his post on that soon...</p> <p>Have fun.</p>HadleySat, 20 Jun 2009 18:41:00 +0000tag:leaflabs.com,2009-06-20:/2009/06/nodebox-and-getting-sick/Leaf what?http://leaflabs.com//2009/06/leaf-what/<p>Welcome to the LeafLabs development blog, brought to you by the LeafLabs team. You may be wondering, "What <em>is</em> LeafLabs?". We're a start-up based in Massachusetts aiming to bring hardware prototyping to the masses. We are making hardware and software for the rapid development of projects that can benefit from the cooperation of a microprocessor and an FPGA in the same computational framework.</p> <p>Our software suite is just starting to take shape, and we will be releasing components of the design software as it becomes stable enough for public testing (contact be-a-beta-tester@leaflabs.com for more information). In July, our hardware - informally dubbed LeafBoards - will be in alpha release, undergoing rigorous testing by our trusted alpha-users. As soon as August, our first public hardware release (code-name: "Marilyn") will go on sale, and you can join the open-hardware movement.</p> <p>We'll be posting our experiences and thoughts all throughout development, so stay tuned.</p>drewsMon, 15 Jun 2009 21:06:00 +0000tag:leaflabs.com,2009-06-15:/2009/06/leaf-what/The S.A.V.E. Toolbox and GTK+http://leaflabs.com//2009/06/the-save-toolbox-and-gtk/<p>Today we started our first software endeavor - the Signal Analysis and Visualization Engine (S.A.V.E.) Toolbox. It will allow the user to compose complex systems in terms of nodes - either pre-packaged or hand-coded in a C-like language - which execute various functions on their inputs and feed the outputs to connected nodes. The user may write or select various input functions, and graph outputs in an oscilloscope-style x-y plot. Additionally, the S.A.V.E. toolbox will also be able to parse the functions represented by these node nets into Verilog. At the end of the day, we want the S.A.V.E. toolbox to be the principal interface between the end-user and the FPGA on the Leaf boards.</p> <p>Today we began to plan out how to implement the GUI front-end of the toolbox. We're using the <a href="http://www.gtk.org">GTK+ toolkit</a>, an object-oriented extension of standard C made for GUI design. Despite how impressed I am with the library of features contained in GTK+, I'm a little dissatisfied with its object-oriented nature. At the core, I'd have to say I'm pretty utilitarian, and object-oriented program seems to sacrifice efficiency  for gains in... well... I haven't yet seen what you really gain. I guess you could say you gain some level of generality, but i think its too much. Anything you'd <em>need</em> to do with classes, objects, and inheritance  (and I'd say there aren't too many things) you could always do manually with structs in standard C. The object-oriented paradigm, however, engenders the idea that <em>everything</em> should be implemented with classes and objects. Thus, much as we did today, you end up spending most of your time deciding which classes each functions should live in, and designing initializer after initializer after initializer. I suppose in the end I'll just have to suck it up though, because I sure as hell don't want to redo all the hard work that GTK+ has taken care of for me.</p>bbradlynTue, 09 Jun 2009 01:34:00 +0000tag:leaflabs.com,2009-06-09:/2009/06/the-save-toolbox-and-gtk/Welcome to the Neighborhood.http://leaflabs.com//2009/06/welcome-to-the-neighborhood/<p>How do you begin a blog...</p> <p>This monday four of your beloved LeafLabbers moved into TREE-house-- TREE standing for The Robots Eat Everyone, obviously. We now live in a nice yellow house behind a nice picket fence in a nice little neighborhood between Central and Harvard Squares. Emphasis on nice. At night  you can hear the traffic from a busy street two blocks away, and in the day-time people walk their dogs and say hello each other as they stroll down narrow residential streets. We live in place where people have birthday parties for children. With balloons. </p> <p>Having moved here from the other, less 'nice', side of Central Square [my part time home; I spent the other half of my time in a little world called East Campus...], the whole notion of a family friendly neighborhood is unnerving. I never particularly worried about my safety in 'da hood' but nor did I worry about having a noise complaint called on me at nine PM. I feel an odd responsibility to protect our next door neighbor, her garden, and her bed and breakfast from whatever bad-influence a bunch of cigarette-smoking, college-aged, full time nerds and whatever bad influences we may have on the children. </p> <p>I guess it's too soon to really say what affect our new semi-responsible lifestyle will have on us, and LeafLabs, so I'll close this with the promise of photographic proof of our reformed ways. </p> <p>Until next time.</p>HadleyMon, 08 Jun 2009 02:21:00 +0000tag:leaflabs.com,2009-06-08:/2009/06/welcome-to-the-neighborhood/