Recently, our friends over at Open Music Labs created an awesome little shield for Maple and Arduino they call the Audio Codec Shield. 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!
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 code to see how it works, and compare it against the effect.
Have you done anything fun with audio and a Maple? Let us know!
Good news, everyone! LeafLabs and Wiring are teaming up to make a single IDE and libraries that will work on all of our boards!
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.
Well, those talks are turning into reality. Now that Wiring is finished with their their 1.0 release, we’re ready to work together to move the Maple IDE over to Wiring’s. This means that, in the future, you’ll be programming Maple from the Wiring IDE.
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.
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.
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 Py3K or Perl 6! Run away!
Relax. We don’t want that to happen either. We’re still going to continue developing libmaple on our own, and all of us at Wiring and LeafLabs are committed to maintaining compatibility with previous releases whenever it’s possible.
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 Wiring Framework 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.
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.
We got our hands on a few WIZ820ios:
This nifty little beast lets you connect to your Maple to the network. With one SPI and three digital IOs, you have the whole Internet in your hands.
So what’s this good for?
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 serial 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 telnet interface and a web server – for the Maple IDE and command line toolchain.
The telnet interface offers a great balance between control and flexibility. Here’s a screenshot of a telnet session with a Maple Mini:
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):
Here’s what happens when you press “search”:
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.
Want to try this out for yourself? The wizEthernet wiki page will help you get started. We’re looking forward to seeing all the beautiful websites everyone cooks up with this!
Here’s our Maple Mini web server:
We’ve got our blink on… Python style!
If you haven’t had a chance to check out the specs on Maple Native:
- 72MHz
- 1MB external SRAM
- DACs
- I2Cs
- SPIs
- UARTs
- ADCs
- FSMC
To summarize, its got some junk in the trunk.
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?”
PYTHON!… on a microcontroller! That you can interact with! At runtime! Tooo good to be true.
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.
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 command line toolchain):
$ git clone git://github.com/leaflabs/projects.git
Then follow the hastily written up instructions on the wiki.
Dave
Maple IDE 0.0.12 is now available for your pleasure.
Changelog
New Stuff
- Support for Maple Native Beta. The Native’s SRAM chip is turned on and accessible by default.
- Dynamic memory allocation working on all boards.
- FreeRTOS support.
- HardwareSPI: pin accessor functions nssPin(), mosiPin(), misoPin(), and sckPin() added.
- Vastly improved documentation for the low-level libmaple library.
Bugfixes
- HardwareTimer::setPeriod() fixed (broken due to a typo in the last release).
- Various fixes to low-level timer support in timer.c.
- RAM builds working again on all boards. (RAM builds were broken on the RET6 boards, see the relevant forum thread here.
Miscellaneous
- stm32.h expanded (and its declarations are more respected elsewhere in the codebase). This makes libmaple more portable to more ST chips.
- Optimized EXTI and timer IRQ handlers.
- Git 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.
Command line toolchain
- Library folders are added to the include path, so they can be included directly.
- Documentation sources were removed and broken out into their own repository.
- New examples added, others improved.
Deprecations
- usart.h rx_buf field in struct usart_dev is deprecated.
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. - stm32.h PCLK1, PCLK2, and NR_INTERRUPTS are deprecated. Use STM32_PCLK1, STM32_PCLK2, and STM32_NR_INTERRUPTS, respectively, instead.
Give it a test drive and let us know how it goes!
The long wait is over! Maple Native’s beta release is on sale! Hurray!

Specifications
- MCU: STM32F103ZET6, a 32-bit ARM Cortex M3 microprocessor.
- Clock Speed: 72 MHz
- 512 KB Flash, 64 KB SRAM (on-chip), 1 MB SRAM (external)
- 106 GPIOs
- 17 PWM pins, at 16 bit resolution
- 21 ADC pins, at 12-bit resolution
- 3 SPI peripherals
- 2 I2C peripherals
- 12 Channels of direct memory access (DMA), with 2 DMA controllers
- 3 USARTs (serial port), 2 UARTs
- 2 advanced, 4 general-purpose, and 2 basic timers
- Dedicated USB port for programming and communications
- Dimensions: 4″ × 2.1″
Why is this a Beta?
Experience has (finally) taught us that finalizing the design of a new board might take a couple of tries. 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.
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.
Contact webmaster@leaflabs.com with website issues
Powered by WordPress, nginx, Linux, and coffee.
This site intended to be valid HTML 4.01 Strict. Best viewed with any standards-compliant browser.
Copyright LeafLabs, LLC, ©2009-2011.
Unless otherwise noted, all content on this website is released under the
Creative Commons Attribution Licence 3.0
Hello Anonymous! Login?







