Python-based MicroController
Gadgetman
Posts: 2,436
Found this strange little beastie on Kickstarter, and figured that it might be interesting for some...
http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers
The board is Cortex M4-based, has uSD slot, 3-axis accelerometer, 4 servo ports...
Interestingly, the stretch goals aren't more HW, but SW libraries. So far he's been adding Wireless and cabled network ( CC3000 and WIZ820io modules), and the next is 'Low power Wireless' using the NRF24L01+ module.
(Actually, they've just passed the £60.000 for that goal, too)
I'm in for the £24 level.
http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers
The board is Cortex M4-based, has uSD slot, 3-axis accelerometer, 4 servo ports...
Interestingly, the stretch goals aren't more HW, but SW libraries. So far he's been adding Wireless and cabled network ( CC3000 and WIZ820io modules), and the next is 'Low power Wireless' using the NRF24L01+ module.
(Actually, they've just passed the £60.000 for that goal, too)
I'm in for the £24 level.
Comments
Micro Python sounds like something I have to get hold of.
Have you also seen the Espruino on kickstarter? http://www.kickstarter.com/projects/gfw/espruino-javascript-for-things
Despite it's name Espruino has nothing in common at all with Arduino. It's a similar concept to Micro Python except it's JavaScript on an ARM micro-controller.
Both these guys come from Cambridge in England but they did not know of each other until recently.
They had both written their interpreters as closed source.
They both designed little boards to run their creations.
They both started their kickstarters on the promise of open sourcing their software and writing new features as much as providing the boards.
I put money into the Espruino mostly to get the software opened up, which it now is. I have been running it on an STM32F4 Discovery board, it's great.
I suspect one day we will see Micro Python and Esprunio JavaScript running on the Propeller II. How cool is that ?
P.S. Here is a great video of Gordon Williams demonstrating what the Epruino can do http://www.youtube.com/watch?feature=player_embedded&v=lrJJQ1uW3lA
May buy one later...
(Not that I care for JavaScript... )
Damian George seems to have done some serious magic there, enabling Python to be compiled to byte code or native machine code and having a built in assembler!
What I'm wondering is how it handles many things going on at the same time. JavaScript is event driven which is perfectly suited to this but Python generally is not.
Aside:
I keep hearing complaints about the lack of "interfaces" in languages recently. What is the deal with that? If your code gets hold of an object that does not implement an expected method (the interface) it is going to crash and burn at run time like many other error you can make in dynamic languages. So what? You fix it, like all those other mistakes.
C++ does not have interfaces. You can fake it with inheritance (or sing lambdas now a days) no body seems to worry about that.
Python has multiple threads which are a more general mechanism than event handling.
An interface is a contract enforced at compile time that an object will support a set of methods. This ensures that your program won't crash at runtime and follows the "no surprises" philosophy. It allows for the dependancy injection or filter chain patterns which are used a lot in modern programs.
C++ supports abstract classes with multiple inheritance which is a more general form of interface based programming. The problem with C++ is that you can do too much of a good thing.
Compile time checks, for example interface contracts, don't mean much with systems like Python where compile and run time are intertwined.
Making interfaces with inheritance always irked me. I want to say that A and B have the same interface whilst not having logically in common. inheritance always seems to mean more than that to me. Inheritance is saying that A and B are a kind of I (the interface) which may not be what I want to say.
You can enforce interface contracts in C++ using lambdas and no inheritance. In which case A and B are not any kind of I. Problem is you then can't store A and B in common stores.
Yep, C++ can sure do too much of a good thing!
I.E. my personal likes, dislikes, and undecideds - without trying to start a language war.
Like:
- List comprehension is an interesting one-line short cut replacement for a for/while loop.
- Sets and dictionaries hashtable-like O(1) performance.
- Good built-in data-structure and algorithm equivalents: list, tuple, set, dictionary.
- Syntax for tertiary is nice. I.E. x = 0 if y < 3 else x += 1
- Command dir(object) is nice to have while exploring a class, but can't replace simple docs.
Dislike:
- The interactive ability of Python doesn't offer any real value.
- I despise ending def, if, while, etc... with a colon ":"
- Version 3.x is not very well supported yet.
- The language syntax needs to stop changing for me to take it more seriously.
- Contrived syntax: No constant variables. No real private methods or variables.
- No compile-time syntax checking makes me crazy.
Not sure yet:
- Having N digit integers is interesting, but seems only practical for doing scaled floating point.
- Syntax is UML friendly, but I'm not sure that's really of any value.
- The for syntax only applies to lists for n in list: or for n in range(0,100):
- If you really want "case" functionality, you can design it with exceptions.
By the way, there is also PyMite, which has been around for while. It runs, for example, on PIC32 (and others).
Maybe Interactive Pascal makes a return?
Personally, I'm hoping that REXX will be implemented on one soon...
(It started on mainframes, and has been ported to all sizes down to the Palm Pilot, and back up again, and is even considered a precursor to Python, so why not?)
http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers/posts/690857
It may be able to handle two or more servos at the same time, too. Or the designer may have misunderstood my question...