Search found 31 matches

by MrRobot
Sat Nov 07, 2020 7:42 pm
Forum: Pyboard D-series
Topic: Is webrepl asynchronous?
Replies: 0
Views: 1210

Is webrepl asynchronous?

So I've been having trouble connecting to the webrepl while the Pyboard D is busy in the main program.

If webrepl is asynchronous then perhaps I need to make my main program asynchronous.

This could potentially allow access to webrepl?

Can someone verify if my logic is correct?
by MrRobot
Sat Nov 07, 2020 2:13 pm
Forum: Pyboard D-series
Topic: unable to access webrepl when main script is running
Replies: 14
Views: 1626

Re: unable to access webrepl when main script is running

davef wrote:
Sat Nov 07, 2020 1:32 am
Just following the recommended delay on several Micropython document pages for 1-wire.
Can you elaborate a little?

What sort of delay are you talking about?

Do you have a link?
by MrRobot
Sat Nov 07, 2020 2:11 pm
Forum: Pyboard D-series
Topic: unable to access webrepl when main script is running
Replies: 14
Views: 1626

Re: unable to access webrepl when main script is running

750ms to read sensors sounds like a lot. Can you give more details on that? Jan So my Pyboard D is being used as a data logger for various sensors e.g. GPS, Temperature etc. The main loop functions like so: Sample Devices (2-3 minutes) Send Data (2 minutes) deep sleep for 10 minutes The deep sleep ...
by MrRobot
Sat Nov 07, 2020 2:15 am
Forum: Pyboard D-series
Topic: unable to access webrepl when main script is running
Replies: 14
Views: 1626

Re: unable to access webrepl when main script is running

Hi, sorry the time estimates were just an example. I tried all combinations of timing intervals. Different sleep times , but no success. My Data logger essentially works like this: Samples the sensors (takes 2 minutes) Send the data (takes about 3 minutes) Deep sleep for 5/10 minutes Repeat Like I s...
by MrRobot
Fri Nov 06, 2020 10:59 am
Forum: Pyboard D-series
Topic: unable to access webrepl when main script is running
Replies: 14
Views: 1626

Re: unable to access webrepl when main script is running

So putting an input() statement works but hangs the entire device. So it's not a real solution to the problem. My project is a data logger that is located in a Marine environment, so having the pyboard D accessible by Wi-Fi would be hugely beneficial. Otherwise to access the device I need to open th...
by MrRobot
Fri Nov 06, 2020 9:24 am
Forum: Pyboard D-series
Topic: unable to access webrepl when main script is running
Replies: 14
Views: 1626

Re: unable to access webrepl when main script is running

I've found a way to access the webrepl using a timer callback like this: timer = Timer(-1) timer.init(period=1, mode=Timer.ONE_SHOT, callback=preSleep) for countdown in range(20,0,-1): print('Sleeping in ',countdown) time.sleep(1) machine.deepsleep(sleepTime) and my callback function is just this: d...
by MrRobot
Thu Nov 05, 2020 4:33 pm
Forum: Pyboard D-series
Topic: unable to access webrepl when main script is running
Replies: 14
Views: 1626

Re: unable to access webrepl when main script is running

Hi I've tried putting in a small sleep in every loop.

But until I kill the main process running I can't access the webrepl.

I can only enter a password, it won't accept it

Please help me if you can
by MrRobot
Thu Nov 05, 2020 4:30 pm
Forum: Pyboard D-series
Topic: Connect to REPL over WI-Fi
Replies: 5
Views: 771

Re: Connect to REPL over WI-Fi

Whatever you put in for SSID here:

Code: Select all

wl_ap.config(essid='SSID')
The SSID is the Wi-Fi name that you'll see on your PC
by MrRobot
Fri Oct 30, 2020 5:15 pm
Forum: Pyboard D-series
Topic: Pyboard Access Point doesn't ask for password to connect
Replies: 4
Views: 775

Pyboard Access Point doesn't ask for password to connect

So I've used the code: import network wl_ap = network.WLAN(1) wl_ap.config(essid='PyboardD') # set AP SSID wl_ap.config(password='password') # set AP password wl_ap.config(channel=6) # set AP channel wl_ap.active(1) # enable the AP while True: #Do Stuff I can connect my laptop to the access point bu...
by MrRobot
Fri Oct 30, 2020 4:30 pm
Forum: Pyboard D-series
Topic: unable to access webrepl when main script is running
Replies: 14
Views: 1626

unable to access webrepl when main script is running

So I have a data logger running in a infinite loop with a few sensors attached to my Pyboard D. I want to be able to access the repl using webrepl. I'm only able to access webrepl when no code is being executed. webrepl won't let me log in if code is running. Due to the nature of my application I ca...