Search found 2948 matches

by dhylands
Thu Jan 17, 2019 5:36 pm
Forum: ESP8266 boards
Topic: howto: Control passive buzzer
Replies: 2
Views: 47

Re: howto: Control passive buzzer

This post has a link to some code I put together that works on the pyboard: viewtopic.php?f=14&t=2172&p=12291
by dhylands
Tue Jan 15, 2019 9:12 pm
Forum: General Discussion and Questions
Topic: Micropython Syntax Analysis
Replies: 3
Views: 106

Re: Micropython Syntax Analysis

This python code will record the information into a file. So you may also want to look at the implementation of the sys.print_exception function in C. # Exception Test import sys def foo(): raise ValueError('An error happened') def bar(): try: foo() except ValueError as ex: with open('exception.txt'...
by dhylands
Tue Jan 15, 2019 8:55 pm
Forum: General Discussion and Questions
Topic: Binary file when there is no file system
Replies: 1
Views: 59

Re: Binary file when there is no file system

You can store the binary file on the file system if there is enough space.

Otherwise you might want to look at the font code that Peter Hinch (@pythoncoder) did over here:
https://github.com/peterhinch/micropython-font-to-py
which embeds binary font data into a python source file.
by dhylands
Mon Jan 14, 2019 8:18 pm
Forum: Hardware Projects
Topic: How do you configure MicroPython for a custom board?
Replies: 4
Views: 154

Re: How do you configure MicroPython for a custom board?

What you need to do is to create a new board. If you look in the ports/stm32/boards directory then you'll see a bunch of boards which are currently supported. I also have a bunch I've created (or have links to) over here: https://github.com/dhylands/wiki/wiki/MicroPython-Board-files I normally try t...
by dhylands
Sun Jan 13, 2019 6:45 pm
Forum: The MicroPython pyboard
Topic: Pyboard does not show as USB device
Replies: 7
Views: 141

Re: Pyboard does not show as USB device

Also make sure you're not using a "charge only" USB cable
by dhylands
Thu Jan 10, 2019 2:10 am
Forum: Hardware Projects
Topic: How do you configure MicroPython for a custom board?
Replies: 4
Views: 154

Re: How do you configure MicroPython for a custom board?

What processor will you're board be using?
by dhylands
Wed Jan 09, 2019 5:46 pm
Forum: General Discussion and Questions
Topic: SD card vs flash drive, speed?
Replies: 11
Views: 6266

Re: SD card vs flash drive, speed?

OK. Using a 128K for a r/w buffer still allows an additional 380+K. Or make it 256K buffer which still allows for an 256K of additional storage. Still better than what's in there now. The STM32F405 (which the pyboard is based on) has 64K of RAM in the CCM and 128K of regular RAM. Currently, the 64K...
by dhylands
Mon Jan 07, 2019 7:06 pm
Forum: Development of MicroPython
Topic: Adding custom module size info to 'make size' output
Replies: 2
Views: 106

Re: Adding

I'm not familiar with your build system, but the map files are produced by the linker.

In the normal micropython build, you pass the option `-Map foo.map` to the linker to produce a foo.map file.

.map files aren't produced for libraries, only for the final executable.
by dhylands
Sun Jan 06, 2019 5:24 pm
Forum: General Discussion and Questions
Topic: Command not executed MQTT boot.py
Replies: 1
Views: 70

Re: Command not executed MQTT boot.py

The variable mac is local to your init_network function. I think you need to add a "global mac" statement to init_network
by dhylands
Sat Jan 05, 2019 4:04 pm
Forum: General Discussion and Questions
Topic: SD card vs flash drive, speed?
Replies: 11
Views: 6266

Re: SD card vs flash drive, speed?

The problem is that the flask block sizes are 128K for most of the flash.