Jump to content

mpymike

Members
  • Content Count

    46
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by mpymike

  1. Sorry you ran into this problem. The 'lux1.mpy' file is an obsolete example, it uses a number of commands that have now been replaced. It should not have been included in the examples directory. All the mpy commands starting with 'pwm_' have been replaced by the 'pulse_' commands. All the commands starting with 'dir' are replaced with 'pindir'. The define_micro command is also redundant. This would explain the many undefined references you had. To see all the available commands click on the Help button on the bottom window of the mpyEditor, and then click on the 'mpy Programming Language' link. The 'getting started with mpy' link is also very useful. Or you can go to http://www.mpyprojects.com/software/mpy-language/ mpy does not need any include files. All the special IO commands are included automatically by the mpy compiler. I just checked the examples directory. The examples which are dated later than September 2012 should work. Hope this helps. Please let me know if you still have a problem, or if there is some function in lux1.mpy that you need to get working. cheers -mpymike
  2. Yes all the younger makers were fascinated with the MPY Creeper and Zombie models. Interestingly last year when I did makerfaire the average age of Creeper fan was 12-13yr, this year it was 7-8yrs! A bit too young for MPY
  3. Hi all, We had a very busy time at makerfaire, lots of interest in our mission, and lots of encouraging comments. We showed of our projects and the mpyEditor http://www.youtube.com/watch?v=zHmAUSae9UQ Thanks to everyone that visited . -mpymike
  4. thanks spirilis, I missed that post -mpymike
  5. Hi all, The Bay Area Makerfaire is being held next weekend, I'm interested in knowing if anyone is going or exhibiting any msp430 projects. MakerFaire is a huge diy project get together covering all interests. http://makerfaire.com/ The microcontroller area is really huge, must be 100 exhibits. Unfortunately last year it was 90% Arduino, Very few MSP430 exhibits. We'll be there doing our bit with the mpy projects booth. -mpymike
  6. Hi, If you are going to the Bay Area Makerfaire next weekend be sure to visit the mpy projects booth. We'll have various MSP430 powered animated models and games to show off. If you've not heard of Makerfaire before go to http://makerfaire.com/ Basically its a huge exhibition for DIY enthusiasts of all shapes and sizes, all showing off their pet projects. There are first robotics competitions, lego displays, tons of microcontroller exhibits to name a few. I know that Adrian will be there at the TI booth. -mpymike
  7. Hi everyone mpyEditor v1.0 is released. In this release there are several new commands lcd_print, map, limit, interrupt_setup, wait_cycles, global Other changes: Installer updated. Driver changed from libusb to use the tilib driver. The mpyEditor now Auto-detects the msp430 chip. Improved code optimization. The LCD commands are for the Hitachi HD44780 or compatible chipset 16x2 LCD displays. The new interrupt functions support pin interrupts and timer interrupts. There are pulse commands using the msp430 timers, for creating PWM signals and speaker output. Goto the download page at www.mpyprojects.com and give it a try. Don't forget to let us know how you get on, all feedback welcome! -mpymike
  8. Thanks yyrkoon, these comparisons are most useful ! I think the relative efficiency between C and C++ should be important to all microcontroller developers. and size, performance, ease of development need to be the metrics. Some questions about the uart example: 1) This is a small example. I may be wrong about this, but the differences you see may have more to do with the different initialization functions for the different compilers or some other arbitrary compiler features. The overhead between the two might be different and have nothing to do with the C vs C++ discussion. Would a larger example be better to reduce this type of difference? 2) In my mind what we are trying to determine, is the relative code efficiency between a natural C implementation vs a natural C++ implementation. So both examples need to be written optimally using the respective C and a C++ approaches. Is this true for your example? You say that they the code for both is very similar.
  9. You're welcome!! Be sure to let us know if you come across any bugs. -mpymike
  10. Thanks! The mpyEditor uses mspgcc, I haven't tried using g++ as I didn't think there was a need. I would not want to use any c++ constructs unless there is an obvious advantage, and my knowledge of it is too limited. However the mpyEditor will quite happily compile directly from C source, it doesn't need to be mpy, I shall be uploading a new mpyEditor version in the next week, as I found out that the Launchpad driver install wasn't working under w8. This will use mspdebug tilib msp430.dll instead of the mspdebug rf2500 libusb driver. This should make swapping between Energia and mpyEditor a little cleaner. -mpymike
  11. This is an interesting topic.... For a 4k/16k code space microcontroller I'm in the "I prefer C camp" The C compiler basically maps your C program directly into machine code. This means you have more direct control over what machine code is generated. This is most important when trying squeeze the last ounce of function out of each rom byte. When you use the OO features of C++ then the implementation in machine code level is not so obvious and intuitive. (not unless you are a C++ compiler expert). Secondly when trying to explain to somebody the basics of how a piece of code turns into the ones and zeros that are flashed into the rom, it is much easier to demonstrate this using simple C constructs like simple 'for' loops. In fact virtually every C statement can be easily explained. High level OO constructs would introduce too much abstraction.
  12. Depending on how you look at it they are similar. The main difference and advantage is that it uses the Mpy language rather than C (or Sketch). Which is easier to for beginners to use. I just did a quick look at the Energia libraries to see if I could use them within Mpy instead of rolling my own. It might be possible to do so but I would need to take a closer look, the devil would be in the detail. First impressions though are that the LCD library has a lot of functions which I intentionally havn't implemented to keep the code small and minimalistic. -mpymike
  13. I would love to make Mpy object oriented, but currently it's not practical. Under the hood Mpy is really a precompiler, it translates the code to C and it uses the mspgcc compiler to create the assembly code. This technique works well for simple constructs, but trying to map Python objects to c++ objects in an efficient way seems impractical using the precompiler approach. To support c++ would require developing a dedicated Python compiler, which is a much larger project, but not out of the question. My main focus for Mpy is going to be on the hardware side of the project. Providing some simple commands for driving LCDs, servo motors, speakers etc. All the things that will make it more easy and fun to use. -mpymike
  14. @JCR Unfortunately the modules you looking for are way too complex to fit onto a 16k MSP430 microcontroller. So far Mpy is only for the MSP430 microcontroller family MPY supports a small subset of the language and none of the python modules. MPY uses the Python syntax. It is supposed to be dead simple to use, with none of the clutter you get using a conventional microcontroller C language. All variables are signed integers. and there is no support for classes and objects etc. You might be better off trying the Stellaris Launchpad instead, it has way more memory. -mpymike
  15. Hi all, Believe it or not I am still working heavily on the mpy project in my spare time. Sorry for the slow response. I haven't check this site for a while. @pbe Are you still having problems with the driver removal? If so please visit the following page: http://www.mpyprojects.com/software/mpy-editor/iar-kickstart-setup/ It describes how to swap between using the IAR tool and mpyEditor and visa-versa. It does cover the removal of the mpy Editor driver. -mpymike
  16. 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
  17. 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
  18. Web page added! It has instructions for downloading the MpyEditor and running it, but not much else yet. cheers mpymike
  19. 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
  20. Hi I'm a Silicon Valley engineer geek trying to make it easier for kids to learn electronics and programming. Some friends and I have started mpyprojects for making simple electronic projects using the Launchpad and the mpyeditor. We've started a community section on this site for anyone who needs help or wants to help. Thanks 43oh for a great community! cheers mpymike
×
×
  • Create New...