issue193:micro-ci_micro-la
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue193:micro-ci_micro-la [2023/05/29 08:19] – d52fr | issue193:micro-ci_micro-la [2023/06/01 15:31] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 8: | Ligne 8: | ||
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.** | ||
+ | |||
+ | 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. | **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. | ||
Ligne 22: | Ligne 33: | ||
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** | ||
+ | |||
+ | 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. | **That’s all you get. Define the R,G,B color and write it to a specific pixel. | ||
Ligne 30: | Ligne 56: | ||
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.** | ||
+ | |||
+ | 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: | **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: | ||
Ligne 40: | Ligne 74: | ||
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.** | ||
+ | |||
+ | 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/ | **There is also a warning that says “There may be some bugs reading/ | ||
Ligne 48: | Ligne 93: | ||
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. ** | ||
+ | |||
+ | 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. | **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. | ||
Ligne 56: | Ligne 109: | ||
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). | ||
Ligne 62: | Ligne 124: | ||
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. ** | ||
+ | |||
+ | 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: | **LATE ADDITION: | ||
Ligne 70: | Ligne 139: | ||
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.1685341184.txt.gz · Dernière modification : 2023/05/29 08:19 de d52fr