Jump to content

Recommended Posts

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

Share this post


Link to post
Share on other sites

Web page added!

 

It has instructions for downloading the MpyEditor and running it, but not much else yet.

 

cheers

 

mpymike

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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)?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


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.

Guest
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...