## Search found 8 matches

Thu Feb 13, 2020 11:45 pm
Forum: General Discussion and Questions
Topic: How to combine bytearrays fast ?
Replies: 14
Views: 1166

### Re: How to combine bytearrays fast ?

The data for each of the four LED colors is a 240 bytes window of the same bytearray which is quite a bit longer than the 240 bytes. The four windows slide along this array at different speeds in a way that keeps the 0 bytes at the same position for each basic color array. This is faster than calcul...
Thu Feb 13, 2020 4:40 pm
Forum: General Discussion and Questions
Topic: How to combine bytearrays fast ?
Replies: 14
Views: 1166

### Re: How to combine bytearrays fast ?

Wow, this is really impressive. I can't believe that this can be done so fast. This @micropython.native def merge(a, b, c, d, result): for i in range(0,240): result[i] = a[i] + b[i] + c[i] + d[i] return(result) is about 7 times faster than this for i in range(0,240): result[i] = a[i] + b[i] * c[i] +...
Wed Feb 12, 2020 9:30 pm
Forum: General Discussion and Questions
Topic: How to combine bytearrays fast ?
Replies: 14
Views: 1166

### How to combine bytearrays fast ?

Hi folks, I'm a little stuck here and maybe someone can help. There are four bytearrays which have to be combined (for lack of a better word) into a fifth one using the fastest way possible. a = bytearray(240) b = bytearray(240) c = bytearray(240) d = bytearray(240) result = bytearray(240) a = [<arb...
Tue May 01, 2018 8:00 pm
Forum: Drivers for External Components
Topic: TinyRTC I2C Module DS1307 + AT24C32N
Replies: 13
Views: 4014

### Re: TinyRTC I2C Module DS1307 + AT24C32N

That was the right hint.
After changing that everything works fine.
Thank you all for your help.
Sun Apr 29, 2018 1:40 pm
Forum: Drivers for External Components
Topic: TinyRTC I2C Module DS1307 + AT24C32N
Replies: 13
Views: 4014

### Re: TinyRTC I2C Module DS1307 + AT24C32N

Fri Apr 27, 2018 9:12 pm
Forum: Drivers for External Components
Topic: TinyRTC I2C Module DS1307 + AT24C32N
Replies: 13
Views: 4014

### Re: TinyRTC I2C Module DS1307 + AT24C32N

Hi, thank you for the drivers. DS1307 works like a charm. The AT24C32N however doesn't do what it's supposed to do: On my TTGO ESP32 boards (latest loboris port) when i enter this: import machine i2c = machine.I2C(scl=machine.Pin(22), sda=machine.Pin(21)) print('i2c scan:',i2c.scan()) import at24c32...
Fri Apr 27, 2018 12:38 pm
Forum: Drivers for External Components
Topic: BME280 driver that works with ESP32?
Replies: 2
Views: 2719