Search found 5144 matches

by pythoncoder
Mon May 03, 2021 7:32 am
Forum: Raspberry Pi microcontroller boards
Topic: Pico: IMU absolute Euler angle and the PD controller
Replies: 8
Views: 962

Quaternions

The BNO055 library does indeed offer quaternions and this doc shows how to use them with some Python classes. Despite having a fearsome reputation their use for 3D rotation is remarkably simple.
by pythoncoder
Sun May 02, 2021 12:38 pm
Forum: ESP32 boards
Topic: Request for VS1053 with ESP32
Replies: 3
Views: 697

Re: Request for VS1053 with ESP32

I haven't attempted this. I tested using audio files stored on the SD card.
by pythoncoder
Sun May 02, 2021 12:34 pm
Forum: Drivers for External Components
Topic: Drivers for various displays and portable GUI
Replies: 13
Views: 5567

Display drivers and portable GUI

This now supports ST7789, including the TTGO T-Display . This is a low cost ESP32 with an integrated 135*240 color TFT. In my testing these work well and look to be very well made. The driver can be configured in landscape or portrait mode. Other supported displays are these from Adafruit 1.3 inch a...
by pythoncoder
Sun May 02, 2021 12:21 pm
Forum: Development of MicroPython
Topic: uasyncio scheduling algorithm
Replies: 12
Views: 5659

Re: uasyncio scheduling algorithm

There is currently no way to assign a priority to a task. There has been much discussion about providing a means to assign a high priority to individual I/O based tasks. As I understand it this is a work-in-progress on the part of @Damien, as part of a broader re-think of the select.poll mechanism (...
by pythoncoder
Sat May 01, 2021 4:51 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico: IMU absolute Euler angle and the PD controller
Replies: 8
Views: 962

Re: Pico: IMU absolute Euler angle and the PD controller

If I understand your query it is about basic modular arithmetic. Consider these functions: def adiff(a, b): r = (a - b) % 360 return r if r < 180 else r -360 def aadd(a, b): return (a + b) % 360 The aadd function adds a small offset to an angle, so that aadd(350, 3) produces 353°, and aadd(350, 13) ...
by pythoncoder
Sat May 01, 2021 4:14 pm
Forum: ESP32 boards
Topic: Request for VS1053 with ESP32
Replies: 3
Views: 697

Re: Request for VS1053 with ESP32

This library has been tested on ESP32.
by pythoncoder
Sat May 01, 2021 11:18 am
Forum: General Discussion and Questions
Topic: Web server In/out + physical button control via gpio
Replies: 12
Views: 1428

Re: Web server In/out + physical button control via gpio

Interesting. I'm sure you're right about it being easily done, but for web programming n00bs like myself it would be good to see a code example ;)
by pythoncoder
Sat May 01, 2021 11:13 am
Forum: Raspberry Pi microcontroller boards
Topic: Pico/micropython Switch callbacks
Replies: 5
Views: 840

Re: Pico/micropython Switch callbacks

This depends on the hardware platform. ESP32 and ESP8266 use soft IRQ's only. Bare metal platforms can run hard IRQ's.
by pythoncoder
Fri Apr 30, 2021 10:19 am
Forum: Raspberry Pi microcontroller boards
Topic: Pico/micropython Switch callbacks
Replies: 5
Views: 840

Re: Pico/micropython Switch callbacks

There is no escaping the fact that using interrupts requires some know-how. Putting delays in an interrupt service routine is a bad idea, and you need to consider the fact that contact bounce could (almost certainly will) cause the interrupt to occur multiple times. You could write code which checks...