Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Any port of the TM1640 library for MSP?

$
0
0

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.

 

Thanks

~B

 

 

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());

  module.setDisplayToString(text);
}

Viewing all articles
Browse latest Browse all 2077

Trending Articles