Rei Vilo 695 Posted February 16, 2013 Share Posted February 16, 2013 The Educational BoosterPack comes with no ready-to-use library and no out-of-the-box software. I really like the educational challenge for the users: looking for the specification sheets, reading and understanding them, writing the libraries from scratch or adapting existing ones.Obviously, I've developed my own library on Energia for the Educational BoosterPack. But what should I do? keep the true educational challenge intact? or release the library? Just answer the poll! Poll closed, see answer and result below! Detective 1 Quote Link to post Share on other sites
Rei Vilo 695 Posted February 16, 2013 Author Share Posted February 16, 2013 I wasn't sure to release the library for the Educational BoosterPack but the poll at 43oh gave an overwhelming result for the release of the library. So here it is, with three examples: EducationalBoosterPack_Library.zip display the X-, Y- and Z- angles from the accelerometer display a RGB colour based on sound, with green=low, yellow=medium, red=high, white=record! (pictured) adjust the contrast of the LCD and the font size Enjoy! pine, bluehash, energia and 1 other 4 Quote Link to post Share on other sites
Detective 0 Posted February 20, 2013 Share Posted February 20, 2013 Thanks man..... im such a noob with this and actually i dont like the idea to depend on someone elses libraries, but i really appreciate this.... im gonna have a lot of fun with my boards now. Quote Link to post Share on other sites
Rei Vilo 695 Posted February 20, 2013 Author Share Posted February 20, 2013 Thanks man..... im such a noob with this and actually i dont like the idea to depend on someone elses libraries, but i really appreciate this.... im gonna have a lot of fun with my boards now. You're welcome! Analysing someone else code is the best way to learn. Enjoy! Quote Link to post Share on other sites
Rei Vilo 695 Posted April 23, 2013 Author Share Posted April 23, 2013 Please find the Educational BoosterPack pins map at http://embeddedcomputing.weebly.com/educational-boosterpack.html gsutton 1 Quote Link to post Share on other sites
tomastas 0 Posted May 24, 2013 Share Posted May 24, 2013 I am having some trouble getting these libraries and example codes to work with Energia. Do I need xcode for these to work? I just copied and pasted the files into the appropriate folders and tried to load the LCD example but I got a number of compile errors. I'll post them if you need more info Quote Link to post Share on other sites
Rei Vilo 695 Posted May 27, 2013 Author Share Posted May 27, 2013 I am having some trouble getting these libraries and example codes to work with Energia. Do I need xcode for these to work? I just copied and pasted the files into the appropriate folders and tried to load the LCD example but I got a number of compile errors. I'll post them if you need more info That's strange because, although the library was developed with embedXcode, the library and the examples were fully tested with Energia. I've just tested it again and experienced no issue: gsutton 1 Quote Link to post Share on other sites
roadrunner84 466 Posted February 20, 2014 Share Posted February 20, 2014 I know replying to old topics is bad practice, but I wanted to share an extension to the library with you. I was in the need of displaying custom characters on the LCD, but couldn't find a way to do this wit the current library. Unfortunately the ebpLCD class uses private to hide its internal members (like the write() method I use). Would these members have been protected, I could have subclassed it nicely: class ebpLCDex: public ebpLCD { // Modify ebpLCD class to make private members protected public: void setCharacter(uint8_t index, const uint8_t bitmap[8]) { write(EBP_LCD_command, 0x38); write(EBP_LCD_command, 0x40 | (index << 3) & 0x3f); for(uint8_t iter = 0; iter != 8; ++iter) { write(EBP_LCD_data, bitmap[iter]); } setRowLine(0, 0); } }; Alternatively, just add this method to the ebpLCD class instead. Usage example: ebpLCDex lcd; void setup() { const uint8_t doz_dek[8] = {0x1f, 0x2, 0x4, 0x8, 0x10, 0x11, 0xe, 0x0}; const uint8_t doz_el[8] = {0xe, 0x11, 0x10, 0x8, 0x4, 0x8, 0x1f, 0x0}; const char display[17] = "0123456789\x01\x02"; // zero to el in dozenal lcd.begin(); lcd.clear(); lcd.setCharacter(1, doz_dek); lcd.setCharacter(2, doz_el); lcd.print(display); } The index can be a value between 0 and 7 (inclusive) and writing thecharacter with that binary value will write it to the screen (8 to 15 write the same characters). The bitmap contains five bits of display information per byte; the most significant three bits of the bitmap bytes are not used. Each of those bytes describe one row of pixels in a character, so bitmap[0] describes the top row and bitmap[7] describes the bottom row of the character. On 8051projects I found an interactive character editor, that will provide you with the bytes to pass to setCharacter(). Rei Vilo 1 Quote Link to post Share on other sites
Rei Vilo 695 Posted February 20, 2014 Author Share Posted February 20, 2014 Bonjour @roadrunner84 Thanks for the nice addition! As I'm living in Europe, extended characters are required. I've investigated the customs characters as you did but soon generated an extended char set to meet all the strange letters we use in Europe! Here are some of them: Quote Link to post Share on other sites
Rei Vilo 695 Posted February 20, 2014 Author Share Posted February 20, 2014 I know replying to old topics is bad practice, but I wanted to share an extension to the library with you. Why should it be considered as a bad practice? At the contrary, it means the library is used and even maybe useful! Quote Link to post Share on other sites
roadrunner84 466 Posted February 21, 2014 Share Posted February 21, 2014 Bonjour @roadrunner84 Thanks for the nice addition! As I'm living in Europe, extended characters are required. I've investigated the customs characters as you did but soon generated an extended char set to meet all the strange letters we use in Europe! Here are some of them: Quote Link to post Share on other sites
Rei Vilo 695 Posted February 21, 2014 Author Share Posted February 21, 2014 Well, there's an additional problem with the table, as the ASCII codes don't correspond to the ISO-8859-1 norm. Extended characters are coded using Unicode UTF-8 on my Mac so I designed a function to covert Unicode UTF-8 into ISO-8859-1. Other platforms like Windows or Linux may use another coding system for the extended characters. Arduino, and thus Energia, aren't supposed to support extended characters, but I'm using Xcode The char type is limited of 0x00..0x7f and often returns 0xffffffxx for values above 0x7f, for example 0xfffffff4 for 0xf4. The trick is to use an uint8_t. Quote Link to post Share on other sites
fluffy 3 Posted September 21, 2014 Share Posted September 21, 2014 Ok, I'm a bit confused (which is not all that unusual). I thought that the Educational Booster Pack code originally targeted at the 430 had been ported to Stellaris. I downloaded a library from here: http://embeddedcomputing.weebly.com/libraries.html that says "Educational BoosterPack Library for LaunchPad MSP430 and Stellaris with Energia". But looking at the source code for the POT example distributed with the library, I see: #if defined(__MSP430G2553__) || defined(__MSP430G2452__) // LaunchPad specific#else // error#error Platform not defined#endif And indeed commenting out the #ifdef results in compile errors within the library, most of which appear to be that the code references pins with the Pn_m style references which clearly won't fly unmodified on Stellaris. So is there another version of the Educational Booster Pack library for which I should be looking? Thanks for any help you can provide. 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.