Jump to content

Any port of the TM1640 library for MSP?

Recommended Posts

Hi everyone,


Any port of the TM1640 library for MSP430?


The same library for Arduino compiles just fine under Energia 14 but it does NOT work. The LED board shows gibberish and I am guessing this isn't a simple thing to just cross-port the library from Arduino...


Again this isn't 1638 but 1640 -- the LED board with no buttons, just 16 digits.


TM1640 library exists for Raspberry Pi but it is python so no luck for MSP platform... My naive expectation was that an Arduino library will just compile under Enrgia, which it did with no errors but it doesn't work in real life.






For example the sample code provided by the original library author is no go under MSP430:


Copyright (C) 2011 Ricardo Batista <rjbatista at gmail dot com>

#include <TM1638.h> // required because the way arduino deals with libraries
#include <TM1640.h>

// define a module on data pin 1.4, clock pin 1.5
TM1640 module(6, 7);

void setup()
  // nothing to do here

void loop()
  char text[17];

  sprintf(text, "testing %u", millis());

Link to post
Share on other sites

correct, the LED board is 5v and is easily translated from a 3.3v LaunchPad GPIO, however I suspect an issue with the compiler since it was written for Arduino Atmel and even though no errors pop up under Energia the waveform produced out of the PINs isn't what it should be...

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...