Search found 1701 matches

by Roberthh
Sat Nov 16, 2019 3:47 pm
Forum: ESP8266 boards
Topic: ESP-01 I2C
Replies: 2
Views: 91

Re: ESP-01 I2C

GPIO0 is Pin(0), GPIO2 is Pin(2). Both must not be 0 upon boot for normal opeartion, but pulling them up for I2C is no problem. So your code snippet would e.g. be from machine import Pin, I2C scl_pin = Pin(0) sda_pin = Pin(2) i2cbus = I2C(scl=scl_pin, sda = sda_pin) I used scl_pin and sda_pin to poi...
by Roberthh
Sat Nov 16, 2019 7:15 am
Forum: MicroPython pyboard
Topic: ~$ python pyboard.py flash1.py python: can't open file 'pyboard.py': [Errno 2] No such file or directory
Replies: 1
Views: 44

Re: ~$ python pyboard.py flash1.py python: can't open file 'pyboard.py': [Errno 2] No such file or directory

You can find pyboard.py here: https://github.com/micropython/micropython/tree/master/tools And if the file flash.py exists on your device, you can load and start that with: import flash Since you purchased you device from Adafruit and it came with Python loaded, it is most likely their dialect, call...
by Roberthh
Fri Nov 15, 2019 7:16 am
Forum: Other Boards
Topic: Uploading a python file in redbear duo and executing it?
Replies: 2
Views: 96

Re: Uploading a python file in redbear duo and executing it?

I have such an device in my drawer, but did not use it since long. There seems to be almost no activity in the MicroPython implementation. The most recent commit in the forum was on Sept. 2016. So: The implementation has no file system. Therefore you cannot upload code to it, except for immediate ex...
by Roberthh
Fri Nov 15, 2019 7:04 am
Forum: Programs, Libraries and Tools
Topic: uPing - Ping library for MicroPython
Replies: 20
Views: 4457

Re: uPing - Ping library for MicroPython

Please update your firmware to the daily build. Then, SOCK_RAW should be working.
by Roberthh
Wed Nov 13, 2019 12:05 pm
Forum: Development of MicroPython
Topic: screen /dev/ttyACM0 on STM32L4R9IDISC
Replies: 17
Views: 351

Re: screen /dev/ttyACM0 on STM32L4R9IDISC

I would agree to your last statement. But my experience is more general about USB devices connected to virtual machines. And VMware supports USB better than VirtualBox. You could try to boot Linux from a live CD/DVD image to tell, whether that works better.
by Roberthh
Wed Nov 13, 2019 9:14 am
Forum: Development of MicroPython
Topic: screen /dev/ttyACM0 on STM32L4R9IDISC
Replies: 17
Views: 351

Re: screen /dev/ttyACM0 on STM32L4R9IDISC

The support of USB devices by virtual machines is a different sad story. I consider it as simply unreliable. If it work - fine. If not, i cannot deduct anything from that.
by Roberthh
Mon Nov 11, 2019 1:19 pm
Forum: ESP32 boards
Topic: Running a C++ SPI library inside Micropython on ESP32
Replies: 7
Views: 224

Re: Running a C++ SPI library inside Micropython on ESP32

If you run your python code with the viper functions from the device itself as python file (extension .py), you do not need to precompile with mpy-cross. For mpy-cross, check the version with mpy-cross --version. It should be v5.
You may have to re-compile mpy-cross.
by Roberthh
Sun Nov 10, 2019 7:45 am
Forum: ESP32 boards
Topic: Documentation about the inline assembler
Replies: 1
Views: 85

Documentation about the inline assembler

Hello all. Has anyone of you seen a documentation about using the Xtensa inline assembler with the decorator @micropython.asm_xtensa? The only information I kept are a few words puiblished a while ago about the ESP8266 implementation: https://github.com/micropython/micropython/commit/f76b1bfa9f59fcf...
by Roberthh
Sat Nov 09, 2019 12:25 pm
Forum: ESP32 boards
Topic: Set Pins values synchroniously
Replies: 22
Views: 518

Re: Set Pins values synchroniously

Another variant, but just for the int value, using viper code. The init is outside the call. The first call takes 20µs, the following ones 8µs: from machine import Pin @micropython.viper def write_multi(data:int, pin_list:ptr8, plen:int): GPIO_OUT = ptr32(0x3FF44004) # GPIO Output register mask = 0 ...
by Roberthh
Sat Nov 09, 2019 8:29 am
Forum: ESP32 boards
Topic: Set Pins values synchroniously
Replies: 22
Views: 518

Re: Set Pins values synchroniously

I made a variant which allows either a singe value or a list of bits, only that two lists o tuples are provided. One for the bits and one for the pins . Speed is the same in both cases, about 100µs per bit. from machine import Pin, mem32 @micropython.viper def set_gpio(value:int, mask:int): GPIO_OUT...