issue193:micro-ci_micro-la
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue193:micro-ci_micro-la [2023/05/29 07:52] – créée d52fr | issue193:micro-ci_micro-la [2023/06/01 15:31] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | + | **I’m BAAAAAACCKKKKK | |
- | I’m BAAAAAACCKKKKK | + | |
Glenn Frey of the Eagles once said "For the record, we never broke up, we just took a 14-year vacation." | Glenn Frey of the Eagles once said "For the record, we never broke up, we just took a 14-year vacation." | ||
Ligne 8: | Ligne 7: | ||
There has been a lot of movement in the Micropython/ | There has been a lot of movement in the Micropython/ | ||
- | Yes, the Raspberry Pi Pico-W did get its own page in the Micropython.org downloads page. And YES, there are many new things in it. | + | Yes, the Raspberry Pi Pico-W did get its own page in the Micropython.org downloads page. And YES, there are many new things in it.** |
- | The last version of Micropython for the Pico-W was 1.19 and it did provide network support on the Pico-W, and it did work pretty well. | + | Me revoilAAAAAAAA |
+ | |||
+ | Glenn Frey des Eagles a dit un jour : « Pour mémoire, nous n' | ||
+ | |||
+ | Je ne suis certainement pas aussi célèbre que Glen Frey ou les Eagles, mais considérons tout simplement ces 8 derniers mois comme des vacances de Micro-ci micro-là. Cependant, je suis de retour, au moins pour ce mois-ci. J' | ||
+ | |||
+ | Il y a eu beaucoup de mouvement dans le monde de Micropython et des MicroContrôleurs. Il y a quelques semaines (avril 2023), une annonce a été faite : « MicroPython 1.20 a été publié avec le support du Raspberry Pi Pico W, le gestionnaire de paquets mip et un encombrement réduit. » C'est la raison pour laquelle j'ai fait des pieds et des mains pour écrire cette mise à jour spéciale de Micro-ci micro-là. | ||
+ | |||
+ | Oui, le Raspberry Pio-W a obtenu sa propre page dans la page de téléchargement de Micropython.org. Et OUI, il y a beaucoup de nouvelles choses dedans. | ||
+ | |||
+ | |||
+ | **The last version of Micropython for the Pico-W was 1.19 and it did provide network support on the Pico-W, and it did work pretty well. | ||
Micropython 1.20 also is supposed to provide a native Neopixel driver (WS2812) that replaces the need for the older versions. According to the documentation, | Micropython 1.20 also is supposed to provide a native Neopixel driver (WS2812) that replaces the need for the older versions. According to the documentation, | ||
Ligne 22: | Ligne 32: | ||
for dotstar devices. | for dotstar devices. | ||
- | I tried it and yes, you can use it; however, everything you already have that works with the older drivers WILL NOT WORK with the new one. The new driver is really limited. Here is a quick snippet of how to use the neopixel driver | + | I tried it and yes, you can use it; however, everything you already have that works with the older drivers WILL NOT WORK with the new one. The new driver is really limited. Here is a quick snippet of how to use the neopixel driver** |
- | That’s all you get. Define the R,G,B color and write it to a specific pixel. | + | La dernière version de Micropython pour le Pico-W était la 1.19 et elle fournissait un support réseau sur le Pico-W et elle fonctionnait plutôt bien. |
+ | |||
+ | Micropython 1.20 est également censé fournir un pilote Neopixel natif (WS2812) qui remplace les anciennes versions. D' | ||
+ | |||
+ | from neopixel import NeoPixel | ||
+ | |||
+ | pour les dispositifs Neopixel « normaux » et | ||
+ | |||
+ | from apa106 import APA106 | ||
+ | |||
+ | pour les appareils dotstar. | ||
+ | |||
+ | J'ai essayé et oui, vous pouvez l' | ||
+ | |||
+ | |||
+ | **That’s all you get. Define the R,G,B color and write it to a specific pixel. | ||
It doesn’t look like the new driver will support the newer RGBW devices, since there are only three values in the parameter. | It doesn’t look like the new driver will support the newer RGBW devices, since there are only three values in the parameter. | ||
Ligne 30: | Ligne 55: | ||
The bottom line here is don’t expect to use any of your cool LED Strip lighting effects like “fireflys” or “color wave” or “smooth rainbow” using the new integrated driver for MicroPython 1.20 anytime soon. | The bottom line here is don’t expect to use any of your cool LED Strip lighting effects like “fireflys” or “color wave” or “smooth rainbow” using the new integrated driver for MicroPython 1.20 anytime soon. | ||
- | The other major disappointment seems to be in the I2C driver for both the RPi Pico and the RPi Pico-W. There is an issue with the nightly build v1.20.0-50-g786013d46 released on 2023-05-04. A little bit of history is needed here to understand the reason for the frustration that is to come. | + | The other major disappointment seems to be in the I2C driver for both the RPi Pico and the RPi Pico-W. There is an issue with the nightly build v1.20.0-50-g786013d46 released on 2023-05-04. A little bit of history is needed here to understand the reason for the frustration that is to come.** |
- | Back in January of 2021, when the RPi Pico first came out, the Raspberry Pi group released the Pico Python SDK document which was a great boon to anyone trying to get up to speed in learning MicroPython – especially for the brand new RPi Pico board. In section 3.6, it talks about how programs should talk to devices on the two I2C buses. The examples showed for Bus 0 you should use: | + | C'est tout ce qu'il y a : définir la couleur R, V, B et l' |
+ | |||
+ | Il ne semble pas que le nouveau pilote prenne en charge les nouveaux dispositifs RGBW, car il n'y a que trois valeurs dans le paramètre. | ||
+ | |||
+ | En résumé, n' | ||
+ | |||
+ | L' | ||
+ | |||
+ | **Back in January of 2021, when the RPi Pico first came out, the Raspberry Pi group released the Pico Python SDK document which was a great boon to anyone trying to get up to speed in learning MicroPython – especially for the brand new RPi Pico board. In section 3.6, it talks about how programs should talk to devices on the two I2C buses. The examples showed for Bus 0 you should use: | ||
i2c = I2C(0, scl=Pin(9), sda=Pin(8), freq=100000) | i2c = I2C(0, scl=Pin(9), sda=Pin(8), freq=100000) | ||
Ligne 40: | Ligne 73: | ||
i2c = I2C(1, scl=Pin(7), sda=Pin(6), freq=100000) | i2c = I2C(1, scl=Pin(7), sda=Pin(6), freq=100000) | ||
- | They went on to say that the defaults would be for I2C(0) SDA is on Pin 8 (GPIO) and SCL is on Pin 9 and for I2C(1) SDA is on Pin 6 and SCL is on Pin 7. | + | They went on to say that the defaults would be for I2C(0) SDA is on Pin 8 (GPIO) and SCL is on Pin 9 and for I2C(1) SDA is on Pin 6 and SCL is on Pin 7.** |
- | There is also a warning that says “There may be some bugs reading/ | + | En janvier 2021, lors de la première sortie du RPi Pico, le groupe Raspberry Pi a publié le document Pico Python SDK qui a été d'une grande aide pour tous ceux qui essayaient d' |
+ | |||
+ | i2c = I2C(0, scl=Pin(9), sda=Pin(8), freq=100000) | ||
+ | |||
+ | ou pour le Bus #1 : | ||
+ | |||
+ | i2c = I2C(1, scl=Pin(7), sda=Pin(6), freq=100000) | ||
+ | |||
+ | Il est ajouté que les valeurs par défaut sont, pour I2C(0), SDA sur la broche 8 (GPIO) et SCL sur la broche 9 et, pour I2C(1), SDA sur la broche 6 et SCL sur la broche 7. | ||
+ | |||
+ | |||
+ | **There is also a warning that says “There may be some bugs reading/ | ||
So when I started programming for the Pico, I stuck with the defaults of pins 8 and 9 for Bus(0) and that’s what I used in my demo programs that I published here. | So when I started programming for the Pico, I stuck with the defaults of pins 8 and 9 for Bus(0) and that’s what I used in my demo programs that I published here. | ||
Ligne 48: | Ligne 92: | ||
Well, time passes, as we all know, and new versions of the MicroPython for RPi Pico came out and they all stuck to those standards. That is until MicroPython 1.20. | Well, time passes, as we all know, and new versions of the MicroPython for RPi Pico came out and they all stuck to those standards. That is until MicroPython 1.20. | ||
- | If you try to run a program that was working under MP 1.19 using the default I2C pins (8 and 9 for I2C(0) or 6 and 7 for I2C(1) wouldn’t work and an error message would be thrown saying that shown top right. | + | If you try to run a program that was working under MP 1.19 using the default I2C pins (8 and 9 for I2C(0) or 6 and 7 for I2C(1) wouldn’t work and an error message would be thrown saying that shown top right. |
- | If you tried the i2cscan program that we’ve used many times, nothing would show up. Even running the program on an old RPi Pico without the wireless would fail. Yet if you flashed the MicroPython version back to 1.19, everything worked just as you remember. | + | Il y a aussi un avertissement qui dit : « Il peut y avoir des bogues en lisant/ |
+ | |||
+ | Ainsi, lorsque j'ai commencé à programmer pour le Pico, je me suis contenté des valeurs par défaut des broches 8 et 9 pour le Bus(0) et c'est ce que j'ai utilisé dans mes programmes de démonstration que j'ai publiés ici. | ||
+ | |||
+ | Eh bien, le temps passe, comme nous le savons tous, et de nouvelles versions de MicroPython pour RPi Pico sont sorties et elles sont toutes restées fidèles à ces standards. Jusqu' | ||
+ | |||
+ | Si vous essayez d' | ||
+ | |||
+ | **If you tried the i2cscan program that we’ve used many times, nothing would show up. Even running the program on an old RPi Pico without the wireless would fail. Yet if you flashed the MicroPython version back to 1.19, everything worked just as you remember. | ||
I modified my “regular” i2cscan program to include a print line that includes the configuration information, | I modified my “regular” i2cscan program to include a print line that includes the configuration information, | ||
Ligne 56: | Ligne 108: | ||
Returning to my original I2C program that used a temperature sensor and an OLED display, it worked just like before. | Returning to my original I2C program that used a temperature sensor and an OLED display, it worked just like before. | ||
- | Not knowing how long it might take for the MicroPython group to get things working correctly, here is a small table showing the GPIO and Physical pin assignments for both I2C(0) and I2C(1) (see table below). | + | Not knowing how long it might take for the MicroPython group to get things working correctly, here is a small table showing the GPIO and Physical pin assignments for both I2C(0) and I2C(1) (see table below).** |
+ | |||
+ | Si vous essayez le programme i2cscan que nous avons utilisé à maintes reprises, rien ne s' | ||
+ | |||
+ | J'ai modifié mon programme i2cscan « normal » pour inclure une ligne d' | ||
+ | |||
+ | En revenant à mon programme I2C original qui utilisait un capteur de température et un écran OLED, il a fonctionné comme avant. | ||
+ | |||
+ | Ne sachant pas combien de temps il faudra au groupe MicroPython pour faire fonctionner les choses correctement, | ||
- | Once the MicroPython group gets things straightened out, the following table should provide you with a quick reference for which GPIO and Physical pins you can use for either bus (see table next page, top right). | + | **Once the MicroPython group gets things straightened out, the following table should provide you with a quick reference for which GPIO and Physical pins you can use for either bus (see table next page, top right). |
So is it worth upgrading the MicroPython version from 1.19 to 1.20? At first glance, the answer is no. There are enough problems between the I2C issue and the fairly dumbed down NeoPixel driver that I’m really not willing to consider staying at 1.20 for “production and testing”. I will monitor the MicroPython download page (https:// | So is it worth upgrading the MicroPython version from 1.19 to 1.20? At first glance, the answer is no. There are enough problems between the I2C issue and the fairly dumbed down NeoPixel driver that I’m really not willing to consider staying at 1.20 for “production and testing”. I will monitor the MicroPython download page (https:// | ||
- | I’m going to try to leave on a positive note and say that, as time allows, I’ll be working on more projects using the Pico and Pico-W and will try to provide more articles in the near future. And yes, that DOES include the Compass program. | + | I’m going to try to leave on a positive note and say that, as time allows, I’ll be working on more projects using the Pico and Pico-W and will try to provide more articles in the near future. And yes, that DOES include the Compass program. |
- | LATE ADDITION: | + | Une fois que le groupe MicroPython aura mis les choses au point, le tableau suivant devrait vous fournir une référence rapide sur les broches GPIO et physiques que vous pouvez utiliser pour l'un ou l' |
+ | |||
+ | Cela vaut-il donc la peine de mettre à jour la version de MicroPython de 1.19 à 1.20 ? A première vue, la réponse est non. Il y a suffisamment de problèmes entre le problème I2C et le pilote NeoPixel rendi assez bête pour que je ne sois pas prêt à envisager de rester à la version 1.20 pour la « production et les tests ». Je surveillerai la page de téléchargement de MicroPython (https:// | ||
+ | |||
+ | Je vais essayer de clore sur une note positive et dire que, si le temps le permet, je travaillerai sur d' | ||
+ | |||
+ | |||
+ | **LATE ADDITION: | ||
As I was sitting back with a cold glass of water resting from making over 1.7 litres of (not) refried beans, I realized that even if I have the time to update things next month, it will be the end of June before any of you will see the updates. | As I was sitting back with a cold glass of water resting from making over 1.7 litres of (not) refried beans, I realized that even if I have the time to update things next month, it will be the end of June before any of you will see the updates. | ||
Ligne 70: | Ligne 138: | ||
So, I’m going to try to make sure that I update things on my blog at http:// | So, I’m going to try to make sure that I update things on my blog at http:// | ||
- | Until then, as always; stay safe, healthy, positive and creative! | + | Until then, as always; stay safe, healthy, positive and creative!** |
+ | |||
+ | AJOUT TARDIF : | ||
+ | |||
+ | Alors que je me reposais avec un verre d'eau froide après avoir préparé plus de 1,7 litre de haricots (non) frits, j'ai réalisé que même si j' | ||
+ | |||
+ | Je vais donc essayer de faire en sorte de mettre à jour mon blog à l' | ||
+ | |||
+ | D'ici là, comme toujours, restez en sécurité, en bonne santé, positifs et créatifs | ||
issue193/micro-ci_micro-la.1685339531.txt.gz · Dernière modification : 2023/05/29 07:52 de d52fr