mpymike 18 Posted May 23, 2012 Share Posted May 23, 2012 Welcome everyone to the MpyProjects community forum. Please use this forum for all questions or comments. The MpyProjeects website is at http://www.mpyprojects.com Mpy programs are written using the Mpy language which is a very small subset of the Python Language. The MpyEditor development tool is used to create the program and also to compile and flash the MSP430 microcontroller on a Launchpad board. The Mpy language is intended to be very simple and kid friendly. The whole purpose behind MpyProjects is to make electronics and programming easy, fun, and less intimidating. MpyProjects is still in its very early stages and I expect it will be another 6 months before we will be able make it stable and have all the features and documentation in place. So please be patient. The more help we get the faster it will come. So if anyone is interested in helping please let us know by posting to the forum. The initial version of the MpyEditor is up and running and we want people to use it and let us know how you get on. We have already used it to create a number of simple projects which we recently showed off at the Bay Area Makerfaire. The MpyEditor is available from the MpyProjects download page here. So far only the Windows version is available. cheers and good luck - mpymike izdane, LotoCraft and artifus 3 Quote Link to post Share on other sites
rockets4kids 204 Posted May 23, 2012 Share Posted May 23, 2012 Sounds interesting! Do you have a web page or videos? Quote Link to post Share on other sites
bluehash 1,581 Posted May 23, 2012 Share Posted May 23, 2012 Webpage Quote Link to post Share on other sites
mpymike 18 Posted May 23, 2012 Author Share Posted May 23, 2012 Web page added! It has instructions for downloading the MpyEditor and running it, but not much else yet. cheers mpymike Quote Link to post Share on other sites
MattTheGeek 99 Posted May 23, 2012 Share Posted May 23, 2012 Hmm. This is quite interesting. Quote Link to post Share on other sites
suds 0 Posted May 24, 2012 Share Posted May 24, 2012 OK this should be my 3rd post so I should be good to go. I would really like to see some projects posted on the projects page. I think the perfect project to start with is the animated Luxo lamp which uses 3 servo motors driven directly from the MSP430 Quote Link to post Share on other sites
bluehash 1,581 Posted May 24, 2012 Share Posted May 24, 2012 You should go ahead and post it in the Projects section. Also if you have a video of it doing stuff, it works wonders. Quote Link to post Share on other sites
infinityis 16 Posted May 26, 2012 Share Posted May 26, 2012 Not sure how much help I can be, but I'm interested. It looks like it translates the microcontroller python into C code and then compiles normally from there. Some questions I have: Did you start from an existing python-to-C translator or are you starting from scratch? What kind of help do you need? This is definitely a bit "out there" and not relevant to a python-to-C translator, but since the MSP430 uses the Von Neumann architecture (code and data stored in the same space), is it in the realm of possibility that the MSP430 could support an interpreted-mode for python (or other language)? Quote Link to post Share on other sites
mpymike 18 Posted May 26, 2012 Author Share Posted May 26, 2012 Thanks for your interest. You are correct, it does translate the mpy code into C. We then use mspgcc and mspdebug to compile and flash. Mpy is a subset of python, we use the python 'ast' library module (abstract syntax tree) to read in the mpy program as though is were standard python. We then traverse the syntax tree and write out all the elements using C syntax. A few manipulations are done such as additions of the include files and inserting the variable definitions. Only the python constructs that are similar to C are translated, and 16bit signed integers are the only variable types So mpy is a pretty small subset of python This is all new code that I have written. I did look briefly at a couple of Python to C translation tools but they were way too complex and impractical, so I decided to write my own. If you are an experienced Python programmer or are keen to learn then we can certainly use your help. Testing the MpyEditor is another area that is severely lacking. However the main focus at the moment is getting the on-line documentation started for the language, which is all web page design stuff. What areas do you think you might be able to work on? -mike Quote Link to post Share on other sites
bluehash 1,581 Posted May 26, 2012 Share Posted May 26, 2012 Not much from my side.. other than publicity. But you could make a post in the mpy section asking for developers. A pro-tip... if you have requests which differ from the content of the current post, make a new thread. Most people would not have seen the call for developer request in your last post. Quote Link to post Share on other sites
infinityis 16 Posted May 27, 2012 Share Posted May 27, 2012 I have a working knowledge of Python: basic knowledge and experience with the language which is generally assisted/augmented by Google searches for useful bits of code. My particular specialties (in general) are debugging, editing/proofreading, and making simple observations. Overally I basically enjoy finding and/or fixing problems in the work of others, which is generally not perceived as a very endearing quality. Without access to the code or the existence of documentation, there is not much I can do at the moment, but when/if either of those become available I can start looking through it to provide feedback. At this point though, I can suggest that unless your plan is to use something that automatically generates documentation into web pages (e.g. Doxygen) I don't see/understand the need for web page design to support the documentation. I'd suggest simply using your favorite editor/word processor to just start typing something up and then host the document on your website and/or Sourceforge. At some point the effort can/will be made to turn it into a web page or hyperlinked document, but for now just getting the content out there should be sufficient. Quote Link to post Share on other sites
mpymike 18 Posted May 30, 2012 Author Share Posted May 30, 2012 Hi infinityis, The source code is all included in the installation. Its under C:\MPY\mpy_editor\... I will be putting it all under git version control in the next few days. The first step would be to acquaint yourself by downloading and installing the mypEditor and see if you can program the blinky example. thanks -mike Quote Link to post Share on other sites
pbe 0 Posted January 10, 2013 Share Posted January 10, 2013 Sorry for posting here, but there didn't seem to be a Troubleshooting section. First of all, I think that mpy projects is a wonderful idea. It allows people to program MSP430 Quote Link to post Share on other sites
bluehash 1,581 Posted January 10, 2013 Share Posted January 10, 2013 Did you try uninstalling mpy? Also, welcome to 43oh! Quote Link to post Share on other sites
pbe 0 Posted January 10, 2013 Share Posted January 10, 2013 I just uninstalled mpy and all its components. I tried uploading an example to the Launchpad and it has given me the same error. I wonder if it is because I installed mpy in the first place or if it is something else. I can upload to an arduino using the same usb port without problems. I am considering removing the device driver for the Launchpad and reinstalling. Any suggestions? EDIT : Went through Devices and printers ( possibly a bad translation, my Windows is not in English) from the Start menu. I uninstalled the driver and reinstalled it with the one provided on energia.nu. I can upload programs to the Launchpad with Energia. Mpy, at some point through the installation, asks the user to plug in the Launchpad so it can install drivers. I may try to reinstall mpy in the future, but I'll try to bypass the driver installation. 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.