Search found 19 matches

by MrRobot
Wed Jul 29, 2020 11:20 am
Forum: Pyboard D-series
Topic: pyb.main() won't execute my file
Replies: 4
Views: 279

Re: pyb.main() won't execute my file

Thanks for clarifying.

I was puzzled for ages! :lol:
by MrRobot
Tue Jul 28, 2020 9:42 am
Forum: Pyboard D-series
Topic: pyb.main() won't execute my file
Replies: 4
Views: 279

Re: pyb.main() won't execute my file

I found the problem:

In my program I enter a deep sleep state then loop over and over.

When the pyboard started up rshell automatically connected to it and must kill the loop.

When I don't use rshell the loop/sleep works fine.

So if you use deepsleep and rshell be aware of rshell killing the repl
by MrRobot
Mon Jul 27, 2020 10:57 am
Forum: Pyboard D-series
Topic: pyb.main() won't execute my file
Replies: 4
Views: 279

pyb.main() won't execute my file

So I have a boot.py like this: import machine import sys, os, pyb import time pyb.usb_mode('VCP') # Virtual COM Port Only if pyb.SDCard().present(): try: os.mount(pyb.SDCard(), '/sd') sys.path[1:1] = ['/sd','/sd'] os.chdir('/sd') except Exception as e: sys.print_exception(e) print('Error mounting SD...
by MrRobot
Mon Jul 27, 2020 10:44 am
Forum: Pyboard D-series
Topic: REPL over Wi-FI
Replies: 2
Views: 208

Re: REPL over Wi-FI

Great! Thanks very much
by MrRobot
Fri Jul 24, 2020 9:41 am
Forum: Pyboard D-series
Topic: REPL over Wi-FI
Replies: 2
Views: 208

REPL over Wi-FI

Does anyone know a way to connect to the Pyboard D via Wi-Fi. I can see from the following code I can set the Pyboard D as a Wi-Fi access point : import network wl_ap = network.WLAN(1) wl_ap.config(essid='PYBD') # set AP SSID wl_ap.config(password='pybd0123') # set AP password wl_ap.config(channel=6...
by MrRobot
Fri Jul 03, 2020 11:18 am
Forum: Pyboard D-series
Topic: Corruption issues and strange bugs in os module
Replies: 4
Views: 372

Re: Corruption issues and strange bugs in os module

Thank you so much!

I think the issue was copying files over to the pyboard file using them.

Using rshell got rid of the problem.

:D
by MrRobot
Wed Jul 01, 2020 4:11 pm
Forum: Pyboard D-series
Topic: Corruption issues and strange bugs in os module
Replies: 4
Views: 372

Re: Corruption issues and strange bugs in os module

Just for some more snippets from the terminal : >>>os.listdir() ['instruments', 'lib', 'config.json', 'config.py', 'test.py', 'outgoing', 'archive', 'backup', '.Trash-1000'] >>> os.getcwd() '/sd' >>> os.listdir() [] >>> FATAL: term closed term_exitfunc: reset failed for dev UNKNOWN: Input/output err...
by MrRobot
Wed Jul 01, 2020 4:04 pm
Forum: Pyboard D-series
Topic: Corruption issues and strange bugs in os module
Replies: 4
Views: 372

Corruption issues and strange bugs in os module

So I'm trying to output my data in a dictionary to json data using the ujson.dump() method. I keep having an issue with my pyboard not finding the directory I want to write to. Then when I enter os.listdir() i'm given a blank list [ ] Sometimes when I do os.listdir() I get the following : os.listdir...
by MrRobot
Thu Jun 25, 2020 10:17 am
Forum: Pyboard D-series
Topic: Max number of files to iterate with os.listdir()
Replies: 10
Views: 779

Re: Max number of files to iterate with os.listdir()

Thank You! I'll see if I can adopt something like this into my project
by MrRobot
Tue Jun 23, 2020 11:45 am
Forum: Pyboard D-series
Topic: Max number of files to iterate with os.listdir()
Replies: 10
Views: 779

Re: Max number of files to iterate with os.listdir()

Ah that's a shame.

Regrading your idea of a dict maintained by ujson, wouldn't I need to load this dict every time I want to store more data.
Wouldn't this have the same bottleneck with the 2MB on board Memory?

Do you have a code snippet as an example?