carlosperate / awesome-microbit

A curated list of BBC micro:bit resources.
https://twitter.com/awesomemicrobit
Creative Commons Zero v1.0 Universal
1.01k stars 186 forks source link

Time, pseudo silmultaneus readinds parsing and acting #548

Closed Salva-OA closed 1 month ago

Salva-OA commented 1 year ago

Hi,

Do yo know if there is document explaing timers and multitask rules?.

For instance if we want to design a model with a temperature/humidity sensor, a real time clock, and an 7 digit display, two pwm servos to represent an analog clock .... and then write code in phyton so the time pulses used in sending data to the display, ask readings of the sensor and move servos could be used "pseudo-simultaneouslly"

If not posible in python, maybe in C. What might be the limit for combining elements on an expansion board that are time dependant, and we should think on radio/cable extension to another Microbit v1 board?

Do you if exists any instruction in micropython that allows to know the timers used/assigned to i2c clock, to pwm frecuency, .... so when when we combine several of these devices be able to debug what is happening.

Last, do you know if it is posible to generate your own clock signal to simulate pseudo uart comunications with two microbits v1 through 3 wires (clk, tx, rx), in a way that this clk signal should be maintained always running and do not be affected by pauses on the main code. The idea is that if we receive a string of two bytes (parameter/ value) we could stored in a buffer and later process it, or maybe inmidiatally if there is some kind of interrupts.