Search found 85 matches

by chuckbook
Wed Apr 17, 2019 2:47 pm
Forum: General Discussion and Questions
Topic: Anybody know how to make stdin non-blocking?
Replies: 4
Views: 127

Re: Anybody know how to make stdin non-blocking?

I thought so. But I agree, having some of the termios features on MPY's stdin would be nice.
So far we are using pyb.USB_VCP() to do things like USB to UART converters on pyboards.
by chuckbook
Wed Apr 17, 2019 8:48 am
Forum: General Discussion and Questions
Topic: Anybody know how to make stdin non-blocking?
Replies: 4
Views: 127

Re: Anybody know how to make stdin non-blocking?

Hi Dave,
I'm not quite sure I understood your problem but we always use termios with c_lflags ICANON == off and parameters:

Code: Select all

c_cc[VMIN] = 0
c_cc[VTIME] = 0
That makes perfect polling read.
by chuckbook
Sun Apr 07, 2019 10:15 am
Forum: Pyboard D-series
Topic: Unresponsive pyboard: how to tell if it's dead?
Replies: 6
Views: 249

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

You can safely power a PYBD from VIN with a voltage from 3.3V to 4.8V. Don't use any voltage above 4.8V if your board has a wireless module installed. If you would like to power from a 5V power supply I recommend to use a 1A silicon diode in series with the 5V power line.
by chuckbook
Sat Apr 06, 2019 3:09 pm
Forum: Pyboard D-series
Topic: Unresponsive pyboard: how to tell if it's dead?
Replies: 6
Views: 249

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

Note that there is a fuse in the USB-HS power path. If by any chance more than 1 A is drawn from the USB host, this would trip the fuse immediately. If a regular USB host port is used, the over current limit of a USB port will kick in at 500 mA leaving the PYBD fuse intact. However, recent USB host ...
by chuckbook
Sat Apr 06, 2019 7:40 am
Forum: Pyboard D-series
Topic: Problem connecting after power cycle
Replies: 7
Views: 182

Re: Problem connecting after power cycle

I repeated the test with longer timeouts. Same result. However, when I selected a much weaker AP (-74dB) I got failures to connect after power-cycling. I modified your code to do a soft reboot after timeout and the second attempt always succeeded. I have a rough guess what could cause this problem (...
by chuckbook
Fri Apr 05, 2019 5:20 pm
Forum: Pyboard D-series
Topic: Problem connecting after power cycle
Replies: 7
Views: 182

Re: Problem connecting after power cycle

Out of curiosity I tested your script with a SF6W but due to lack of a WBUS-DIP28 I had to use USB-HS. There wasn't a single failure with ~20 power cycles. It took ~7s to re-connect after a power cycle. I will try to get hold of a WBUS-DIP28 and repeat the test. PS: The AP I used was in the same roo...
by chuckbook
Fri Apr 05, 2019 4:59 pm
Forum: Pyboard D-series
Topic: Problem connecting after power cycle
Replies: 7
Views: 182

Re: Problem connecting after power cycle

I only wanted to rule out any power faults due to current limit kicking in.
by chuckbook
Fri Apr 05, 2019 12:08 pm
Forum: Pyboard D-series
Topic: Problem connecting after power cycle
Replies: 7
Views: 182

Re: Problem connecting after power cycle

@pythoncoder, do you have a battery installed?
Assuming you don't use a battery, why do you use USB_FS instead of USB_HS?
by chuckbook
Fri Apr 05, 2019 8:33 am
Forum: Pyboard D-series
Topic: WBUS-DIP28 Usb FS port issue (SOLVED)
Replies: 5
Views: 173

Re: WBUS-DIP28 Usb FS port issue (SOLVED)

You may test 500mA limit without updating mboot by putting:

Code: Select all

EN1 = pyb.Pin('E1', mode=pyb.Pin.IN, pull=pyb.Pin.PULL_UP)
in boot.py
by chuckbook
Thu Apr 04, 2019 10:04 am
Forum: Pyboard D-series
Topic: WBUS-DIP28 Usb FS port issue (SOLVED)
Replies: 5
Views: 173

Re: WBUS-DIP28 Usb FS port issue

I'm assuming you are working with a DIP28 board. Note that the default current limit for the USB-FS connector is 100 mA.
PE1 (EN1) should read 1, PE6 (EN2) should read 0 for 500mA current limit.