Search found 3667 matches
- Sat Apr 24, 2021 5:10 pm
- Forum: ESP32 boards
- Topic: Error running ver 1.15 on ESP32-S2
- Replies: 10
- Views: 6239
Re: Error running ver 1.15 on ESP32-S2
There is a GENERIC-S2 board definition. So you can build a version. Besides that you can try circuitpython, eve if I do not favour it.
- Thu Apr 22, 2021 7:39 pm
- Forum: Programs, Libraries and Tools
- Topic: More convenient pin initialization for ESP8266
- Replies: 5
- Views: 2456
Re: More convenient pin initialization for ESP8266
That's fine. I made two minor changes to it: a) Simplify the function mp_pin_make_new() b) Change pyb_pin_print() such that it shows both the pin name and the GPIO number. // constructor(id, ...) mp_obj_t mp_pin_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { ...
- Thu Apr 22, 2021 6:05 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: working with multiple serial devices
- Replies: 3
- Views: 2391
Re: working with multiple serial devices
You can and should use the PIO for implementing additional uarts. The example code is available.
- Thu Apr 22, 2021 1:07 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: UART not working with today's version of micropython
- Replies: 45
- Views: 20028
Re: UART not working with today's version of micropython
Yes and no. It uses IRQ for handling the input and output buffers. But you cannot set a handler to get called when data arrives. P.S.: There is still a hiccup in RP2040 using two threads. The UART code has to be in thread0 only. And besides that, the RP2040 stalls (not related to UART) if the thread...
- Thu Apr 22, 2021 1:00 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: Raspberry Pico Statemachine Restart
- Replies: 3
- Views: 2409
Re: Raspberry Pico Statemachine Restart
The intention is to restart the state machine again from the initial address in it#s initial state. That is useful for state machines that stuck in a certain state, e.g. because the input data was incomplete. Then, timeout checking can be done outside the state machine. A good example is the simplif...
- Thu Apr 22, 2021 12:57 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: UART not working with today's version of micropython
- Replies: 45
- Views: 20028
Re: UART not working with today's version of micropython
The behavior of the UARt has changed from blocking to non-blocking. Now it is consistent to all other ports. If you call uart.read() and there is not data present, it will return immediately with the Value None. You can set a timeout value in the instantiation of the UART. Or you can check before ca...
- Thu Apr 22, 2021 9:20 am
- Forum: MicroPython pyboard
- Topic: Most efficient searching within large bytearrays
- Replies: 8
- Views: 9649
Re: Most efficient searching within large bytearrays
print (bytes(buf).find(b'OK')) #test if buf contains a substring 'OK'
Note: bytes(buf) creates a copy of buf.
Note: bytes(buf) creates a copy of buf.
- Wed Apr 21, 2021 7:54 pm
- Forum: Programs, Libraries and Tools
- Topic: More convenient pin initialization for ESP8266
- Replies: 5
- Views: 2456
Re: More convenient pin initialization for ESP8266
It can be done by modifying machine_pin.c. At line 312 the pin number is taken from the argument. That has to extended to compare against a string of known Pin names.I made a trial build by: a) extending the _pin_obj_t structure in modmachine.h to: typedef struct _pyb_pin_obj_t { mp_obj_base_t base;...
- Wed Apr 21, 2021 4:03 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: [REGRESSION] #include "tusb.h" not working
- Replies: 9
- Views: 5761
Re: #include "tusb.h" not working
I simply call make in the ports/rp2 directory. By default there is a Makefile as wrapper to cmake.
Edit: I do not add any include "tusb.h". No need to fo so.
Edit: I do not add any include "tusb.h". No need to fo so.
- Wed Apr 21, 2021 3:17 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: [REGRESSION] #include "tusb.h" not working
- Replies: 9
- Views: 5761
Re: #include "tusb.h" not working
I can build that without any changes to scripts. So maybe you start over with: make clean and make I had that problem too initially, but that went away after Feb 12 with the. I cannot find the discussion I had about that any more. maybe related: https://github.com/micropython/micropython/pull/6791 h...