Search found 3113 matches

by dhylands
Wed Aug 06, 2014 4:03 pm
Forum: General Discussion and Questions
Topic: Reading a temperature value from a TMP36 sensor
Replies: 16
Views: 8087

Re: Reading a temperature value from a TMP36 sensor

Hey Bob, All the voltages from the micropython board will be 3.3v and when reading an ADC the range 0-4095 maps onto 0.0v upto 3.3v. Looking at the datasheet 500mv on Vout corresponds to 25C. That 0.5V would correspond to an ADC reading of 0.5/3.3 * 4095 = 620 That makes the formula be Vout = ADC * ...
by dhylands
Wed Aug 06, 2014 7:25 am
Forum: General Discussion and Questions
Topic: Stellaris LM4F120
Replies: 1
Views: 1639

Re: Stellaris LM4F120

It looks like this has been renamed to be theTM4C1233H6PM, which has 256K flash and 32K RAM.

In theory, micropython could run on this.

I'm running micropython on the Teensy 3.1 which has 256; flash and 64; RAM.
by dhylands
Wed Aug 06, 2014 4:38 am
Forum: Development of MicroPython
Topic: Documentation
Replies: 8
Views: 3542

Re: Documentation

My understanding is that the documentation for the APIs (like pyb.UART) http://micropython.org/doc/module/pyb/ is generated from the source code using this script:
https://github.com/micropython/micropyt ... /gendoc.py
by dhylands
Tue Aug 05, 2014 2:15 pm
Forum: General Discussion and Questions
Topic: ADC Callback Exception
Replies: 2
Views: 1193

Re: ADC Callback Exception

Dividing by 3 needs to create a new float object, which needs to do a memory allocation.

If you used // 3 then it would create an int which doesn't need to do a memory allocation.

IRQs aren't allowed to do memory allocations.
by dhylands
Tue Aug 05, 2014 6:10 am
Forum: Drivers for External Components
Topic: Anyone working on HD44780 library?
Replies: 27
Views: 13708

Re: Anyone working on HD44780 library?

I occasionally get syntax errors on lines that are fine (although these may have been caused by this bug: https://github.com/micropython/micropython/issues/788 (on non-DEBUG builds it doesn't assert, it just corrupts some memory) This seems to happen after doing a Control-D, and goes away if I hit t...
by dhylands
Mon Aug 04, 2014 6:42 pm
Forum: Development of MicroPython
Topic: Assertion 'mp_obj_is_exception_instance(self_in)
Replies: 8
Views: 3499

Re: Assertion 'mp_obj_is_exception_instance(self_in)

Damien fixed the underlying issue, and I confirmed that the assert is no longer hit with my DEBUG=1 build.
by dhylands
Mon Aug 04, 2014 8:40 am
Forum: Development of MicroPython
Topic: Assertion 'mp_obj_is_exception_instance(self_in)
Replies: 8
Views: 3499

Re: Assertion 'mp_obj_is_exception_instance(self_in)

How do I determine and specify the software version number, especially when downloading as a zip? To download a zip for the latest source code use: https://github.com/micropython/micropython/archive/master.zip To download a zip for the source code as of a particular commit use: https://github.com/m...
by dhylands
Mon Aug 04, 2014 7:39 am
Forum: Development of MicroPython
Topic: Assertion 'mp_obj_is_exception_instance(self_in)
Replies: 8
Views: 3499

Re: Assertion 'mp_obj_is_exception_instance(self_in)

I'm able to reproduce the problem using a DEBUG=1 build. The size of the executable is considerably larger, and if I boot up and just press Control-D then I get: PYB: sync filesystems PYB: soft reboot Assertion 'mp_obj_is_exception_instance(self_in)' failed, at file ../py/objexcept.c:426 FATAL ERROR...
by dhylands
Mon Aug 04, 2014 6:59 am
Forum: Development of MicroPython
Topic: UART Receive Problem
Replies: 2
Views: 2628

Re: UART Receive Problem

Error 3 is a timeout. Since you didn't specify a timeout on your recv, it uses a default of 5 seconds. It means that 4 characters didn't arrive within 5 seconds. I'm not sure what the intended behaviour is for receiving less than the number of characters that you asked for. Generally I would have ex...
by dhylands
Sun Aug 03, 2014 7:37 am
Forum: Drivers for External Components
Topic: Anyone working on HD44780 library?
Replies: 27
Views: 13708

Re: Anyone working on HD44780 library?

I got 4-bit and 8-bit mode working usng GPIO pins.

In my case I was using a 4x20 LCD. I uploaded a youtube video.

Adding support for the LiquidCrystal API seems like a reasonable thing to do.