bubba198 2 Posted October 13, 2015 Share Posted October 13, 2015 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); } Quote Link to post Share on other sites
Rei Vilo 695 Posted October 14, 2015 Share Posted October 14, 2015 What's inside the library? Please refer to Some Misconceptions about Libraries and howto: porting libraries - some help needed. Quote Link to post Share on other sites
Rei Vilo 695 Posted October 14, 2015 Share Posted October 14, 2015 TM1640 VDD = 5 V while LaunchPad operates at 3.3 V. Quote Link to post Share on other sites
bubba198 2 Posted October 14, 2015 Author Share Posted October 14, 2015 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... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.