Search found 1207 matches

by Roberthh
Sun Jan 20, 2019 3:20 pm
Forum: Other Boards
Topic: K210(Sipeed M1) run face tracking PT demo with maixpy
Replies: 9
Views: 962

Re: K210(Sipeed M1) run face tracking PT demo with maixpy

At this place: https://github.com/robert-hh/K210-Stuff you'll find a few files that might be helpful when working with the K210. One of them fixes the bug with input(), sys.stdin.read() etc. It also includes an adapted version of the pye.py editor, which may be useful since you had to remove vi. A l...
by Roberthh
Thu Jan 17, 2019 2:13 pm
Forum: Other Boards
Topic: Stop Crtl C keyboard interrupts?
Replies: 3
Views: 97

Re: Stop Crtl C keyboard interrupts?

It does only work in scripts, not in the REPL loop. During REPL mode, keyboard interrupt will always be reset to Ctrl-C. So if you make a short script like: import micropython import time micropython.kbd_intr(ord('q')) while True: print('.', end='') time.sleep(0.5) You can cause a keyboard interupt ...
by Roberthh
Thu Jan 17, 2019 6:31 am
Forum: Other Boards
Topic: Stop Crtl C keyboard interrupts?
Replies: 3
Views: 97

Re: Stop Crtl C keyboard interrupts?

micropython.kbd_intr(chr) will do that. micropython.kbd_intr(chr) sets the interrupt to the character chr. micropython.kbd_intr(-1) disables keyboard interrupt, micropython.kbd_intr(3) sets it back to Ctrl-C

See also: http://docs.micropython.org/en/latest/l ... ython.html
by Roberthh
Sat Jan 12, 2019 11:07 am
Forum: Other Boards
Topic: Looking for a board with 16 ADC channels and WiFi
Replies: 7
Views: 237

Re: Looking for a board with 16 ADC channels and WiFi

You can use up to four ADS1015 or ADS1115 on a single I2C bus, if you configure the address Pin accordingly.
by Roberthh
Fri Jan 11, 2019 1:45 pm
Forum: Other Boards
Topic: Looking for a board with 16 ADC channels and WiFi
Replies: 7
Views: 237

Re: Looking for a board with 16 ADC channels and WiFi

The CC3200 board (Wipy1) is discontinued. The ESP32 has principally 16 channels, but most board break out only a subset of them. Besides that, the ESP32 ADC is bad, like the ESP8266 (nodemcu) one. You can alsways usd external ADCs, like based on an ADS1115 or others, which are connecetd to the MCU b...
by Roberthh
Thu Jan 10, 2019 8:37 pm
Forum: General Discussion and Questions
Topic: Sensing sound from a speaker
Replies: 9
Views: 252

Re: Sensing sound from a speaker

Without knowing the kind and level of signal at the speaker it is hard to give any advice. If that door bell has also a LED which lights up at the same time, interfacing is much easier. But still level & polarity must be known.
by Roberthh
Thu Jan 10, 2019 8:31 pm
Forum: ESP8266 boards
Topic: OSError: scan failed
Replies: 6
Views: 1224

Re: OSError: scan failed

For me it works. I made a little test script: from network import WLAN wlan=WLAN() while True: try: print(wlan.scan()) except OSError: print("Silence") Firmware: MicroPython v1.9.4-773-gafecc124-dirty on 2019-01-04; ESP module with ESP8266 I placed the ESP8266 in the microwave (thanks Peter), with t...
by Roberthh
Mon Jan 07, 2019 8:46 am
Forum: Programs, Libraries and Tools
Topic: GY-45 MMA8451 Module Digital Triaxial Accelerometer
Replies: 2
Views: 117

Re: GY-45 MMA8451 Module Digital Triaxial Accelerometer

That looks pretty easy. Only the I2C access methods have to be adapted, in this case simplified. That affctes the methods _read_into(), _write_u8() and _read_u8(). The can be replaced by the i2c module methods writeto_mem, readfrom_mem and readfrom_mem_into.
by Roberthh
Fri Jan 04, 2019 8:53 pm
Forum: The MicroPython pyboard
Topic: Is there a code level reason why my interrupt is not getting called?
Replies: 9
Views: 232

Re: Is there a code level reason why my interrupt is not getting called?

Yes and no. The example below looks different. Besides that, declaring globals is anyhow helpful for clarity.

Code: Select all

>>> num=1
>>> def f():
...     print(num)
... 
>>> f()
1
>>> b=bytearray(1)
>>> def y():
...     b[0] = b[0] + 1
... 
>>> y()
>>> b
bytearray(b'\x01')