Search found 3118 matches

by dhylands
Wed Apr 10, 2019 2:53 pm
Forum: General Discussion and Questions
Topic: Basic VS Code use and setup
Replies: 4
Views: 150

Re: Basic VS Code use and setup

Basically, you need to execute a command line terminal program and pass whatever arguments that particular command line terminal program wants. Most terminal programs (like putty) for Windows are GUI based and not command line based. However, python includes one called miniterm which comes with pyse...
by dhylands
Wed Apr 10, 2019 2:28 pm
Forum: MicroPython pyboard
Topic: ADC support on NUCLEO_H743ZI
Replies: 5
Views: 309

Re: ADC support on NUCLEO_H743ZI

The way that pins are setup on the STM32 ports is as follows: 1 - In the ports/stm32/boards directory you'll see files which end in _af.csv. The one for the STM32F767 is stm32f767_af.csv This file contains all of the pins that the MCU (STM32F767 in this example) can have, along with all of the alter...
by dhylands
Wed Apr 10, 2019 1:45 pm
Forum: General Discussion and Questions
Topic: Basic VS Code use and setup
Replies: 4
Views: 150

Re: Basic VS Code use and setup

I wrote a python program I call find_port.py. You can find a copy of it here: https://github.com/dhylands/dotfiles/blob/master/bin/find_port.py It should work on Windows, Mac, or Linux. If you run find_port.py -l then it should list all of the USB serial devices. For example, under Windows 10, I tes...
by dhylands
Wed Apr 10, 2019 2:34 am
Forum: General Discussion and Questions
Topic: Where do print statements send information from main.py?
Replies: 9
Views: 216

Re: Where do print statements send information from main.py?

The way I do it is to import it.

If I create a file called foo.py, then you can do:

Code: Select all

import foo
and that will load and execute foo.py by following the search path specified in sys.path.
by dhylands
Tue Apr 09, 2019 10:16 pm
Forum: MicroPython pyboard
Topic: ADC support on NUCLEO_H743ZI
Replies: 5
Views: 309

Re: ADC support on NUCLEO_H743ZI

Were you trying to use the board pin labelled A0? Or the CPU pin A0? Can you post the actual code that used? And what missing configuration did you find? I took a look at the pins.csv file for the NUCLEO_H743ZI and it seems to have errors. https://github.com/micropython/micropython/blob/master/ports...
by dhylands
Mon Apr 08, 2019 7:29 pm
Forum: General Discussion and Questions
Topic: Where do print statements send information from main.py?
Replies: 9
Views: 216

Re: Where do print statements send information from main.py?

I think it's probably important to mention that pyb.main('main.py') doesn't actually execute main.py. It just sets the name of the file to execute when it comes time to execute main.py. And as Robert already mentioned, calling pyb.main('main.py') is essentially a noop since the name to execute alrea...
by dhylands
Sat Apr 06, 2019 2:39 pm
Forum: Pyboard D-series
Topic: Unresponsive pyboard: how to tell if it's dead?
Replies: 6
Views: 250

Re: Unresponsive pyboard: how to tell if it's dead?

Try putting the board in DFU mode (ie connect the DFU pin to 3.3v) and press reset and see if the board shows up on DFU mode. Normally you'd see 3 LEDs on dimly. If you can get into DFU mode you can reflash the firmware. Make sure you have the right firmware for three board. I.e pyb1.0 vs 1.1 vs lit...
by dhylands
Sat Apr 06, 2019 2:34 pm
Forum: MicroPython pyboard
Topic: Timer and Watchdog Max Period
Replies: 1
Views: 72

Re: Timer and Watchdog Max Period

On the stm32 there are 16-bit and 32-bit timers. The max period will depend on the frequency of the timer and whether it's 16 or 32-bit.

For example a 16-bit timer running at 1MHz will have a max period of 65535 x 1 usec ticks or 65.535 msec.
by dhylands
Thu Apr 04, 2019 9:52 pm
Forum: ESP8266 boards
Topic: New script downloaded to board but old one still runs
Replies: 1
Views: 92

Re: New script downloaded to board but old one still runs

If you created a frozen module, then that might be getting loaded instead of the internal one. You can use help('modules') to see the list of internal modules. When loading modules, micropython searches for them along the path specified in sys.path. So check that as well: >>> sys.path ['', '/lib', '...