Search found 42 matches

by Iyassou
Tue Feb 01, 2022 9:27 pm
Forum: Programs, Libraries and Tools
Topic: Matrix library for MicroPython
Replies: 33
Views: 33695

Re: Matrix library for MicroPython

Hiya. Thanks for bringing this issue to my attention! :D The issue lies with the following portion of code in the fill function: [[x]*(num_cols if num_cols is not None else order)]*order which boils down to [[x] * a] * b] My intention when writing this code then was that in order to create a list of...
by Iyassou
Sat Oct 09, 2021 9:55 pm
Forum: General Discussion and Questions
Topic: Encrypt in ucryptolib, decrypt in NodeJS
Replies: 1
Views: 1672

Re: Encrypt in ucryptolib, decrypt in NodeJS

I'm not familiar with NodeJS, so I've been messing around with AES-256 in CBC mode with the crypto library in an online editor since I read that crypto2 is a wrapper around crypto and I'm assuming from your code that you're using crypto2. I'm using a 128-bit IV, and tried encrypting/decrypting a 32-...
by Iyassou
Sat Sep 12, 2020 2:50 pm
Forum: Programs, Libraries and Tools
Topic: mpyaes - utility library around ucryptolib.aes
Replies: 4
Views: 3649

mpyaes - utility library around ucryptolib.aes

Hello all. mpyaes (GitHub) is a utility library around ucryptolib's aes class. It handles AES encryption and decryption of bytes-like objects and files, and implements PKCS7 padding, which is handled in the background. Encrypting and decrypting files makes use of a block-sized buffer and memoryview ...
by Iyassou
Sun Apr 12, 2020 9:27 pm
Forum: General Discussion and Questions
Topic: [SOLVED] Need help to change icon on LED matrix with serial input
Replies: 6
Views: 4081

Re: Need help to change icon on LED matrix with serial input

I don't have a microbit, but I think the issue might be the comparisons. joystick = uart.read() should be returning a bytes object according to the docs , in which case comparing it to strings (e.g. "1") would never be equal. One suggestion: since you're sending bytes objects ending with a newline w...
by Iyassou
Thu Jan 16, 2020 12:29 pm
Forum: MicroPython pyboard
Topic: Calling a TimerChannel method in Timer callback
Replies: 3
Views: 3202

Re: Calling a TimerChannel method in Timer callback

When I run your example code (with those two lines uncommented), I get the red LED flashing and on my scope I can see the PWM waveform on X1. What firmware version are you using? Hopefully this is a firmware issue then. My Pyboard's on MicroPython v1.10. I did notice that if I set the callback afte...
by Iyassou
Sat Jan 11, 2020 7:19 pm
Forum: MicroPython pyboard
Topic: Calling a TimerChannel method in Timer callback
Replies: 3
Views: 3202

Re: Calling a TimerChannel method in Timer callback

I wrote some simple code to test this out: #from micropython import alloc_emergency_exception_buf #alloc_emergency_exception_buf(100) from pyb import Timer, Pin, LED PPR = 2688 #red = LED(1) timer = Timer(5) A = timer.channel(1, Timer.PWM, pin=Pin('X1')) B = timer.channel(2, Timer.PWM, pin=Pin('X2')...
by Iyassou
Sat Jan 11, 2020 6:22 pm
Forum: MicroPython pyboard
Topic: Calling a TimerChannel method in Timer callback
Replies: 3
Views: 3202

Calling a TimerChannel method in Timer callback

Hello. I'm currently writing some code that will let me control an incrementally encoded DC motor using the PID algorithm and a Timer. The error that's being fed to the algorithm is the difference between the chosen target position and the incremental encoder's count. The encoder's count is updated ...
by Iyassou
Tue Sep 17, 2019 10:59 am
Forum: ESP32 boards
Topic: main.py does not appear to working after boot
Replies: 50
Views: 34779

Re: main.py does not appear to working after boot

I had the same issue but with a different ESP32-based board: the ESP32-DEVKITC 32U. As far as I'm aware this is just an ESP32-DevKitC V4 that's based on an ESP32-WROOM-32U. This board comes with 2 buttons next to the microUSB port: EN and BOOT. When the board is plugged into a socket it does not exe...
by Iyassou
Sat Sep 07, 2019 1:21 pm
Forum: ESP32 boards
Topic: ESP32 SPI RAM not initialized
Replies: 4
Views: 3241

Re: ESP32 SPI RAM not initialized

I understand now. Thanks for typing out this explanation.