Search found 9 matches
- Thu Aug 13, 2020 5:18 pm
- Forum: General Discussion and Questions
- Topic: While True loop Stopping
- Replies: 7
- Views: 3207
Re: While True loop Stopping
I did actually try if data: but it didn't work, though this might have been for another problem and I fixed the wrong thing... I also thought about the if data is not None: but stopped when it was working! Will have a play to make more efficient. Also, yes, I immediately noticed that I received mult...
- Thu Aug 13, 2020 2:52 pm
- Forum: General Discussion and Questions
- Topic: While True loop Stopping
- Replies: 7
- Views: 3207
Re: While True loop Stopping
Of course it does.
So I now know what blocking means!
Thankyou
Working
So I now know what blocking means!
Thankyou
Code: Select all
data = stdin.buffer.read(-1)
if str(data) != "None":
etc
- Thu Aug 13, 2020 9:51 am
- Forum: General Discussion and Questions
- Topic: While True loop Stopping
- Replies: 7
- Views: 3207
Re: While True loop Stopping
Thank you both for your replies. I'm newbing my way through this and still not sure which way to go This code is running on an XBee3 The documentation says for UART to use stdin. I can't use UART as it doesn't exist if I try to import it, these are in a 232 shield so that would mean the USB_VCP is o...
- Wed Aug 12, 2020 4:21 pm
- Forum: General Discussion and Questions
- Topic: While True loop Stopping
- Replies: 7
- Views: 3207
While True loop Stopping
My While True loop runs once and then keeps stopping at data = stdin.buffer.read(1) until it receives something else I did try if stdin.buffer.read(1) != "": data = stdin.buffer.read(1) but that doesn't help If there is a problem with data = stdin.buffer.read(1) then shouldn't it thow an exception? ...
- Fri Jul 24, 2020 12:19 pm
- Forum: Other Boards
- Topic: Sipeed MAIX BiT - machine.time_pulse_us
- Replies: 4
- Views: 2467
Re: Sipeed MAIX BiT - machine.time_pulse_us
Thanksloboris wrote: ↑Fri Jul 24, 2020 9:17 amForum:
https://en.bbs.sipeed.com/
https://loboris.eu/forum/forumdisplay.php?fid=17
- Fri Jul 24, 2020 6:39 am
- Forum: Other Boards
- Topic: Sipeed MAIX BiT - machine.time_pulse_us
- Replies: 4
- Views: 2467
Re: Sipeed MAIX BiT - machine.time_pulse_us
Thanks again, jimmo
I was going to ask them directly but apart from the online docs and a few posts on here from a couple of years back they don't seem to have much in the way of support.
I was going to ask them directly but apart from the online docs and a few posts on here from a couple of years back they don't seem to have much in the way of support.
- Thu Jul 23, 2020 3:14 pm
- Forum: Other Boards
- Topic: Sipeed MAIX BiT - machine.time_pulse_us
- Replies: 4
- Views: 2467
Sipeed MAIX BiT - machine.time_pulse_us
I wanted to use "machine.time_pulse_us" on a Sipeed MAIX BiT It seems to newb me that "machine" on these boards have their own set of functions, not the standard micropython ones I've been using on an ESP32. I think the information I am looking for to recreate "pulseSensor = machine.time_pulse_us(pw...
- Thu Jul 23, 2020 1:16 pm
- Forum: General Discussion and Questions
- Topic: PW Distance Sensor - pulseIn()
- Replies: 2
- Views: 1738
- Wed Jul 22, 2020 11:24 am
- Forum: General Discussion and Questions
- Topic: PW Distance Sensor - pulseIn()
- Replies: 2
- Views: 1738
PW Distance Sensor - pulseIn()
I'm trying to get a line of code that works in the Arduino IDE to work in McroPython and I have failed for 2 days. pwPin = pulseIn(pwPin, HIGH); It's for an ultrasonic sensor that I'm using the single PW connection for so it's not a "transmit and echo" type. I understand that pulseIn() does not exis...