Enjoying Micropython and board

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
willingc
Posts: 4
Joined: Sat Aug 02, 2014 5:15 am

Enjoying Micropython and board

Post by willingc » Mon Aug 04, 2014 5:35 pm

Thank you to all who contributed to this project for hardware and software. I just received my boards on Friday, and it has been fun getting started with them.

The tutorial is well done. The code details posted on this board are very helpful.

I'm hoping to help out with pull requests and such over time. Thanks to the dedicated folks that brought this to life. You rock!

Carol

JennaSys
Posts: 33
Joined: Tue Jul 15, 2014 8:29 am
Location: Southern California, US
Contact:

Re: Enjoying Micropython and board

Post by JennaSys » Wed Aug 06, 2014 3:42 am

Ditto the above - I just received my Pyboards as well and so far I'm blown away by how awesome these little things are! It has really surpassed my expectations. I would never think that a piece of hardware could be "Pythonic", but you guys have done it. It's the most straightforward and easy to use embedded platform I've tinkered with to date. OK, I'll stop gushing now and get back to playing - thanks for bringing this gem to market!
John Sheehan

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Enjoying Micropython and board

Post by pythoncoder » Mon Aug 11, 2014 3:23 pm

I couldn't agree more! As a (retired) electronics design engineer I can't fault the hardware's electronic and mechanical design design or its documentation. It runs Python code far faster than cPython on the Raspberry Pi and its behaviour is much more deterministic: by my tests it responds to hardware interrupts in under 12uS. Coding interrupt handlers in Python is a delight, and provided you pay attention to the rules and the usual concurrency issues it works!

The Micropython language is evidently a work in progress but I'm impressed by the amount of the language which is already implemented. I'd like to see more documentation on the rules for using the special code emitters. My attempts at using them, even on simple functions, have been rewarded by an opportunity to test the board's hard reset facility. Unless there is a doc I haven't yet managed to find? I think I can guess why my two line function is crashing - the type of its argument can be an int or a float - but if this must be avoided it would be good to know at the outset rather than via trial and error.

The board's appeal could readily be extended to those with a fear of soldering irons by offering a variant with socket headers and servo connectors fitted. A build with servo connectors and pins on the two long sides of the board would also enable the whole thing to be plugged into a motherboard like the Arduino micro. But ideas like these are probably best implemented by an enterprising distributor once the boards become widely available.

A deeply impressive product.

Regards, Pete
Peter Hinch
Index to my micropython libraries.

Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: Enjoying Micropython and board

Post by Turbinenreiter » Mon Aug 11, 2014 3:43 pm

I'd like to see more documentation on the rules for using the special code emitters. My attempts at using them, even on simple functions, have been rewarded by an opportunity to test the board's hard reset facility.
I'm pretty sure this behavior is considered a bug, not a limitation that has to be documented. I think the aim is to have the emitters working on any function you'd wanna use it.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Enjoying Micropython and board

Post by pythoncoder » Tue Aug 12, 2014 10:13 am

I take your point about it being a bug. Unfortunately the situation is more complex than I thought. I have a simple utility function:

Code: Select all

@micropython.native
def seconds(S):                                             # convert int or float seconds to integer microseconds
    return int(1000000*S)
This runs fine in every test scenario I've tried, except the actual code I'm developing. Somewhere in 500 lines of code there is a pathological usage case which causes the hardware to lock up solid. Naturally it works fine undecorated...

I'll keep trying to locate the cause so I can report it.

Regards, Pete
Peter Hinch
Index to my micropython libraries.

Post Reply