• GitHub wiki updated with basic intro

    barawn08/10/2015 at 17:42 0 comments

    I've been having some trouble writing up an introduction to lwframework because it constantly seems like everything's interconnected. Plus I feel like I have to justify its existence: "why use callbacks for everything?" "why not just create new Energia stuff" etc. etc.

    So I just started putting up something on the GitHub wiki to explain how it works. Hopefully I'll be adding an example directory soon to show how to do certain things. I'm trying to avoid any direct comparisons to other projects, because that requires quite a bit of work to do it fairly. But that'll come, obviously.

    So the first wiki entry:

    https://github.com/barawn/lwf_core_template/wiki

    has the 'blink an LED' project. Hopefully some of lwframework's benefits become obvious already here - blinking multiple LEDs, at different, or even varying, rates becomes trivial, and the system stays asleep the majority of the time anyway.

  • lwframework's history

    barawn08/07/2015 at 20:05 0 comments

    Ever actually disassemble Energia/Arduino code and look at why you need to run the microcontroller so fast to do things? Or look at the resource usage of an RTOS like Contiki?

    I did. Not for fun, obviously - in both cases I tried to use Energia or Contiki in a project I was working on, which has quite a lot going on with it. And neither of them worked. Granted, I was doing something fairly silly in that project - a high baud rate soft UART - but I did get it working.

    Then I came across Alex Mykyta's MSP430 code library here:

    http://mykyta.info/msp430/

    which I thought was pretty nice. It gives you events, timers... the basics of an RTOS. But when I tried to use it, it did a few things which were deal-breakers for me: it disabled interrupts a ton, and required a lot of time inside an ISR to do things. Adding an event to an event queue takes a huge amount of time.

    That made me think: what do you need events for, and what's the simplest way to do them?

    That gave birth to lwevents.

    Next, I came across the PDQ GFX libs:

    https://github.com/XarkLabs/PDQ_GFX_Libs

    And that made me think hey, I can redo a ton of this stuff in C++, using CRTP classes, and rapidly build up a framework of Useful Microcontroller Stuff very fast. With no overhead! Lots of the benefits of C++, no performance drawbacks. (Debugging it currently sucks, but that's TI's fault).

    And that gave birth to lwframework.