

pyMCU - The Python Controlled Microcontroller - adulau
http://www.pymcu.com/

======
kqr2
Also check out pymite:

<http://wiki.python.org/moin/PyMite>

PyMite is a flyweight Python interpreter written from scratch to execute on
8-bit and larger microcontrollers with resources as limited as 64 KiB of
program memory (flash) and 4 KiB of RAM. PyMite supports a subset of the
Python 2.5 syntax and can execute a subset of the Python 2.5 bytecodes. PyMite
can also be compiled, tested and executed on a desktop computer.

------
haldean
This sounds like it's a bunch of GPIO ports connected to a PC over serial, and
a nice Python module that runs on the PC. It's not Python-on-a-microcontroller
(they never claim it is, but that's the assumption I made upon seeing the
website). For those who want this sort of thing, it's also easy to get an
Arduino, write a quick sketch that receives and transmits over USB serial, and
use pyserial to control it.

~~~
jwatte
Exactly my reaction.

You can run Python actually ON a Raspberry Pi, btw. That device is just not as
robust on GPIO (5V destroys it, weak current source.)

~~~
orangethirty
Yes, good point. Though getting an RPi these days is quite a chore. Its
backordered until hell freezes over.

------
Baliw
Very cool stuff. I always wanted to pick up PIC embedded programming, but
always had too many other things in Python to play with. Now it seems I
wouldn't have to learn a new language. I wonder how well this stacks up with
hand written PIC code.

What's the coolest thing you've done with a PIC?

~~~
jrockway
Why not just use a Raspberry Pi? This device doesn't actually run Python, it's
just an interface between USB and I/O pins like the Bus Pirate (which is also
controllable with Python).

~~~
Baliw
Correct me if I'm wrong, I don't have any experience with a Raspberry Pi, but
wouldn't the end result from this be able to be embedded in a much smaller
form factor than a Raspberry Pi?

This looks like mainly a test board. Would one be able to take the end result
of this and program a production PIC board with it?

Seems like that might be useful for smaller form factors than what a Raspberry
Pi is capable of.

~~~
jrockway
If you want to write production embedded code, you have two choices: C and
assembly. That's the result of my extensive research, anyway: gcj doesn't
work, the AVR forth implementation uses too much flash and can brick your chip
at runtime (for other reasons), etc.

~~~
watchdogtimer
You can also program 8+bit PICs in JAL, a Pascal-like language.

------
mkhattab
This looks cool. It's unfortunate that it's Python-controlled rather than
Python programmable. It uses a PIC16, so you'd probably have to throw out
essentially all of Python's dynamic features. At that point, one might want to
stick with Arduino or PIC Basic stamp.

I think a Lisp programmable uC would be infinitely cool, but again using these
types of uC you would have to forgo the dynamic features.

~~~
duskwuff
Possibly of interest: Pycorn. It's a project a friend of mine is working on to
port a Python interpreter to bare-metal ARM.

<https://github.com/tornewuff/pycorn>

From what I understand, though, it requires quite a bit more memory than is
available on most microcontrollers. 64KB isn't enough for Python to even start
up, let alone do anything useful.

~~~
jwatte
I think the Cortex M4s that are coming out have 512 kB and up in their bigger
variants. They also have more MHz and MIPS, and just need a cheap board
available. The TI Stellaris Launchpad is looking good in this direction.

~~~
duskwuff
The Stellaris tops out at 96KB SRAM (and the part on the Launchpad is 32KB).
I'd be interested to know what parts you're looking at, as right now I'm
looking into building an SPI-based RAM expander for the Stellaris board.

Regardless, I believe Torne was saying that Python ends up needing a few
_megabytes_ to work. So you still pretty much end up needing something with
external RAM.

------
Schwolop
My preference for this style of thing is the series of controllers, sensors,
and actuators made by TinkerForge. They use the same style of USB daemon to
talk to the microcontroller(s), but there are then bindings in Python, C#,
C++, Java, Perl, etc, etc. They also have more 'stuff' available to add (IMUs,
I/O, motor controllers, all many of sensors, video controllers, etc.)

I've no idea why they're not more popular. Low marketing budget I'd guess...

------
Symmetry
When I first saw the link I was hoping it was a hardware python interpreter,
sort of like what the Reduceron does for Haskell.
<http://www.cs.york.ac.uk/fp/reduceron/>

