Header File Brings Arduino Sketches To The TI Launchpad

[Chris Hulbert] is making it easy for Arduino users to program MSP430 chips with a header file that allows you to compile Arduino sketches for the Launchpad. This makes sense, as the growing number of Arduino sketches available, and the low cost of the TI Launchpad make for a good bedfellows. It’s really wasn’t that hard to make this happen, although you’re not going to find support for all of the Arduino functions just yet.

At the time of writing, [Chris] has just 51 lines of code committed to the project. It provides macros for setup(), loop(), delay(), pinMode(), pinBit(), digitalWrite(), and digitalRead(). You’ll notice that one of the most important parts of the header file is that it disables the watchdog timer for the user (a stumbling block for many MSP430 beginners). It’s an interesting solution, but to be truly useful we’d want to see hardware integration with the Arduino IDE. That, as well as the rest of the Arduino functions are at the tips of your fingers. Get coding and submit your push requests to [Chris] for inclusion in his repository.

[Thanks Chris]

31 thoughts on “Header File Brings Arduino Sketches To The TI Launchpad

  1. @r_d why? because you feel like electronics shouldn’t be accessible? surely this will, if anything, move arduino developers to a new platform. isn’t this what people want?

  2. This is by far one of the best hacks I’ve seen on HAD in a good long while.

    Wow – the arduino team will drop a brick. They are pretty protective of their little money making machine. And at $30 each – as you’d expect, they have a healthy profit margin. (too much maybe?)

    Now, who’s down for some $4.30 arduinos?

  3. In terms of ‘code elegance’ – WTF!

    However this is a really cool project which will help introduce even more people to firmware hacking, which is definately a good thing.

  4. @Bill D. Williams

    Yah, real protective. That’s why you can buy them from other people(same gerbers, just with the name filed off) for $20-something. Or get a barebones one without that stupid USB chip for like $15.

    Real protective.

  5. @Bill d. Williams

    to continue where @zing left off….

    Or get the chip for $4.30 and burn the free bootloader your self using the free IDE (and a cheap Atmel ISP). It has 16 times the program space, 16 times the RAM, 4 more IO pins and 6 analog inputs.

  6. @Bill D. Williams:
    You have no idea what you’re talking about. The purpose of the Arduino project was to make an _OPEN_ platform for learning. That is, one that anyone is free to build or modify (or sell). They are not protective of anything. In fact being “protective” of their “little money-making machine” goes against the very purpose of the Arduino.

    I might be bitter and dismissive of Arduino-related projects, but I can’t say that the it wasn’t a pretty big step forward.

  7. r_d: What makes me cringe about this is that Arduinites with no clue are going to see it and go “Ooh! I can run my Arduino ‘sketches’ on something that costs a tenth what an Arduino does!” And then they find out that, even with clueful and clever header support, porting between the platforms is still pretty far from trivial. Then, once the initial wailing and gnashing of teeth has mostly died down, we spend the next two or three years constantly hearing the ignorant shriek about how MSPs suck because “they can’t run this nifty blinking-LED Arduino sketch I found on instructables.com!”

    It’s a nifty idea in theory and likely in practice as well, but I can’t imagine there being enough yellow caution tape and disclaimers in the world sufficiently to lower the expectations of the sort of ignorant magical thinkers who’d believe that any but the most utterly trivial Arduino code can run on an MSP without significant modification.

    TiWrap, on the other hand, is super nifty, especially for somebody like me who’s been having no success at all getting piezo buzzers to behave usefully. Thanks, Mike!

    tl;dr: If you want an Arduino, you know where to find one. TiWrap is awesome.

  8. @r_d I can think of a few things.

    For one the launch pad has no USART, thats going to be a big turn off to the arduino people.

    It has far less memory, The arduino boot loader takes up more memory than the Value line has…(2k)

    Less IO pins, only 8, and 2 of those are taken by a software USART if you use one, Another 1 for an onboard switch, and another 2 for the onboard Leds…(that you can disable with jumpers)

    The Big reason the Launch pad is not taking off is the really bad Fragmentation in the comunity, The TI documentation is great….but there is A lot of it and the TI site is TERRIBLE, if they really want to take over the market the C code is not going to stop them. I mean just look at the arduino Documentation, its very very clean.

    Also the watchdog timer really trips up people? I mean, EVERY tutorial or book I have read on the 430 is REAL specific about turning that off.

  9. Arduino is protective of their money making machine.

    But it’s not the physical boards, it’s their name.

    Best and most recent example is they threatened to throw lawyers (Sony style) at Jeremey Blum for his “Arduino Tutorial” now called ‘Tutorial for Arduino’ because of the threat.

  10. Right.

    Not everyone in OSHW is in it for the right reasons. Some are a greedy business wrapped in a pretty, open source package.

    Thinking otherwise is just naive.

  11. This is great as my launchpad is arriving tomorrow! Also in case anyone is interested the ti store is shipping stuff free ATM. Even to international destinations (via fedex) – fantastic!

  12. While there are some valid arguments about arduino being a money hungry machine because of their name and their enevatableness to sell their own product (god forbid) thats sold along side zillions of other compatible platforms. is it not reasonable that a group makes a profit for their efforts for spinning off their own OSHW?

    Now on to the matter for the TIwrapper/ MSParduino emulator. Having been a recent convert to the msp430 platform for both hobby and business i think this is a (limited) good concept. The reason for the limited part is because MSP series chips are meant to be cheap (or minimalist, however you look at it). For this reason i think that if the TI wrapper stays at the stage it is now it will 1. leave space for lots more code and also provide that hook to encourage Arduinians to begin learning on a new platform or mostly learn how to use the rest of the available peripherals on their own and all the different various configurations that they can be used in.

    one more thing. launch pad converts can rejoice in real debugging capabilities incorporated at 20% the cost ;)

  13. what, nobody caught this yet?

    it’s a /pull/ request. I ordered 6 launchpads when they came out and they never arrived. I guess I should complain…will probably wait until I’m stateside…

  14. I can’t imagine the Arduino people are THAT protective of their trademark.


    Well, for one there are a million Arduino compatible `diono development boards – no problem.

    You can pretty much expect any “duino” to be a compatible clone.

    The one duino system causing brand and platform CONFUSION is the Netduino, which is wholly incompatible with Arduinos. I cant believe those db’s are trying to ride on the Arduno’s name (but what do you expect, from a Microsoft .net platform?)

  15. Up until now, I’ve only been an arduino user. The STM32 & ARM boards I have experimented with were too big of a step up.

    I just got my launchpad yesterday and I think the learning curve will be more manageable than 32 bit.

    Why the MSP430? I’m building a battery operated robot which needs low power consumption. MICRO amp(uA) standby times! Sold me on the MSP Valueline for this specific application.

    God, I sound like astroturf, but seriously uA!

  16. Macros for setup() and loop()? I only see macros for delay(), pinMode(), digitalWrite(), and digitalRead(). I see plain, ordinary ANSI C prototypes for setup() and loop(), and a main() function that uses them.

    Perhaps Mike needs to brush up on his C basics, particularly what the preprocessor (cpp) does.


  17. How about you just learn some basic microcontroller skills and forget this nonsense? It is pathetically easy to use the MSP430, I don’t understand why you would want to do something like this.

  18. I don’t get why people are so upset. If someone has a project in mind that could use a microcontroller, why is it so imperative that they learn bitwise operations and all the ins and outs of the peripherals. Let them enjoy themselves!

  19. @NatureTM — well put. I taught an MSP430 course and a lot of people kind of hit a wall with the bit-wise stuff. Folks in the class were quite intelligent .. lots of sheepskins from various Penn graduate schools .. it was a little weird … but it took some effort to teach bit bopping and some folks decided after that that they weren’t all that interested anymore.p

  20. The biggest problem that I have with the MSP is the changes from one chip to another. They all use the same sets of peripherals, but there are multiple versions of the same peripheral – timer a3, timer a7, uart vs usart, etc. To use them requires you to select a chip with exactly what you want, then pouring over the thorough documentation to figure out how to use it. A week later, you come up with a new project, and you have to re-learn everything you know, and try not to mash the new with the old.

    With arduino, you can throw the same code together in 1/10 the time it takes you to fully understand ONE module. Maybe the code isn’t as efficient, but when all that I want is to write ‘hello world’ on an lcd, I really don’t care.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.