Outils pour utilisateurs

Outils du site


issue168:micro

Welcome back! Every once and a while, I’ll be doing a review of a MicroController of some sort that I have tested. I don’t get any free devices from anyone, so if I can afford one, I’m pretty sure that you can too. This month, we have a lot to cover, so let’s get started right away.

Bienvenue à nouveau ! De temps en temps, je vais faire la critique d'un quelconque microcontrôleur que j'ai testé. Je ne reçois aucun appareil gratuit de qui que ce soit, donc si je peux m'en offrir un, je suis presque sûr que vous le pouvez aussi. Ce mois-ci, nous avons beaucoup de choses à couvrir, alors commençons tout de suite.

Cytron Maker Pi Pico A day or so after the release of the RPi Pico, I found out about this product. Cytron (https://www.cytron.io/c-development-tools/c-arm-development-tool/p-maker-pi-pico) is a really innovative company based in Malaysia. Unfortunately, when I found out about it, it was already sold out even though it was still in beta. I waited, and the next batch came in, but was sold out again. Finally, I was able to get one of the third batch of devices and, believe me, it was worth the wait! They were sold out again within a few hours.

Cytron Maker Pi Pico

Un jour ou deux après la sortie du RPi Pico, j'ai découvert ce produit. Cytron (https://www.cytron.io/c-development-tools/c-arm-development-tool/p-maker-pi-pico) est une entreprise vraiment innovante basée en Malaisie. Malheureusement, lorsque j'ai découvert ce produit, il était déjà épuisé alors qu'il était encore en phase bêta. J'ai attendu, et le lot suivant est arrivé, mais il a été à nouveau épuisé. Finalement, j'ai pu obtenir l'un des appareils du troisième lot et, croyez-moi, l'attente en valait la peine ! Ils étaient à nouveau en rupture de stock en quelques heures.

The device includes a development board with a Pico already soldered onto it. Each pin is brought out on the board as a male header pin, and every GPIO pin has an LED. There are 6 Grove connectors, 3 buttons, a buzzer, an SD Card slot, a dedicated port for an ESP-01 WiFi card, a NeoPixel RGB LED, and more. All of that for just under $10 USD, and has a 1-year warranty! Shipping (to the U.S. at least) is reasonable and fairly fast. Please be aware, the ESP-01, MicroSD card, and jumpers, are not included with the board. Once I got it and plugged it in, I was surprised that a demo program was already flashed to the Pico. At first glance, the demo highlights the GPIO LEDs by walking through each LED quickly turning them on then off while the buzzer plays a short snippet from the iconic Mario theme song. Being curious, and fairly impressed by the fact that the demo was already there, I tried pressing each of the three buttons. Sure enough there was more demo to be seen. Button 1 toggles all of the GPIO LEDs. Button 2 runs through all of the NeoPixel colors, and Button 3 plays the Mario theme while slowly melding the NeoPixel color shift.

L'appareil comprend une carte de développement avec un Pico déjà soudé dessus. Chaque broche est présentée sur la carte sous la forme d'un connecteur mâle, et chaque broche GPIO est dotée d'une LED. Il y a 6 connecteurs Grove, 3 boutons, un buzzer, un emplacement pour carte SD, un port dédié pour une carte WiFi ESP-01, une LED RVB NeoPixel, et plus encore. Tout cela pour un peu moins de 10 $ US, et avec une garantie d'un an ! L'expédition (vers les États-Unis au moins) est raisonnable et assez rapide. Attention, l'ESP-01, la carte MicroSD et les cavaliers ne sont pas inclus avec la carte.

Une fois que je l'ai reçue et branchée, j'ai été surpris de voir qu'un programme de démonstration était déjà flashé sur le Pico. A première vue, la démo met en évidence les LED GPIO en les allumant et en les éteignant rapidement pendant que le buzzer joue un court extrait de l'emblématique thème musical de Mario. Curieux, et assez impressionné par le fait que la démo était déjà là, j'ai essayé d'appuyer sur chacun des trois boutons. Bien sûr, il y avait encore de la démo à voir. Le bouton 1 permet de basculer toutes les LED GPIO. Le bouton 2 fait défiler toutes les couleurs de la NeoPixel, et le bouton 3 joue le thème de Mario tout en changeant lentement le mélange des couleurs de la NeoPixel.

I have to say that one of the things that I wanted the board for, was to learn more about the NeoPixel RGB LED. I always thought that they were pretty cool, but not cool enough to spend the money to get one of the various types. I really couldn’t come up with a compelling project to justify the purchase. When the demo got to the parts that controlled the NeoPixel, it was so bright that I couldn’t look directly at it. I have created a demo for using the NeoPixel that allows the NeoPixel brightness to be controlled. We’ll take a look at it next month. The good people at Cytron have set up a github repository with example code for both MicroPython and CircuitPython. You can find it at https://github.com/CytronTechnologies/MAKER-PI-PICO. While there aren’t examples for everything that the board can do, for the most part you will find plenty of things to keep you busy for a while. The one frustrating thing is that while the basic capabilities of the ESP-01 will connect to the local network wirelessly, going further than that doesn’t seem to work. I will keep trying to come with some working code for you in the next month or so.

Je dois dire que l'une des raisons pour lesquelles je voulais cette carte était d'en savoir plus sur les LED RGB NeoPixel. J'ai toujours pensé qu'elles étaient plutôt cool, mais pas assez pour dépenser l'argent nécessaire à l'achat de l'un des différents types. Je n'arrivais pas vraiment à trouver un projet convaincant pour justifier l'achat. Quand la démo est arrivée aux composants qui contrôlent le NeoPixel, c'était si lumineux que je ne pouvais pas le regarder directement. J'ai créé une démo pour utiliser la NeoPixel tout en permettant de contrôler la luminosité du NeoPixel. Nous y jetterons un coup d'œil le mois prochain.

Les bonnes gens de Cytron ont mis en place un dépôt github avec des exemples de code pour MicroPython et CircuitPython. Vous pouvez le trouver à l'adresse https://github.com/CytronTechnologies/MAKER-PI-PICO. Bien qu'il n'y ait pas d'exemples pour tout ce que la carte peut faire, vous trouverez, pour la plupart, de quoi vous occuper pendant un certain temps. La seule chose frustrante est que, si les capacités de base de l'ESP-01 permettent de se connecter au réseau local sans fil, aller plus loin ne semble pas fonctionner. Je continuerai à essayer de créer du code fonctionnel pour vous dans le mois à venir.

Over all, this is a great way to get into using the RPi Pico – with lots of exploration possibilities for a very low cost. It’s especially good for a younger budding scientist to learn since there is no soldering involved. Project of the month Last month, we went over a couple of simple “get started” projects that involved the Pico and making the onboard LED do things. Moving from the onboard LED to an offboard is not much more involved, and there’s a lot of information out on the web to do this. I’ll let you research that for yourself. I can, however, point you to a good project direct from the Raspberry Pi Foundation. While designed for young people, it gives you a step-by-step introduction to the Pico and MicroPython Programming. You can find it at https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico.

Dans l'ensemble, il s'agit d'un excellent moyen de se familiariser avec le RPi Pico, avec de nombreuses possibilités d'exploration pour un coût très faible. Il est particulièrement adapté à l'apprentissage d'un jeune savant en herbe, puisqu'il ne nécessite aucune soudure.

Le projet du mois

Le mois dernier, nous avons passé en revue quelques projets simples de « démarrage » qui impliquaient le Pico et l'utilisation de la LED intégrée. Passer d'une LED intégrée à une LED externe n'est pas beaucoup plus compliqué, et il y a beaucoup d'informations sur le Web pour le faire. Je vous laisse faire vos propres recherches. Je peux, cependant, vous indiquer un bon projet directement issu de la Fondation Raspberry Pi. Bien qu'il soit conçu pour les jeunes, il vous permet de vous familiariser pas à pas avec le Pico et la programmation avec MicroPython. Vous pouvez le trouver à l'adresse https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico.

Now for our project. We’ll be dealing with a real world sensor on the Pico. To connect the sensor to the Pico, we will be using I2C. For an overview of I2C, you might want to set your wayback machine to Full Circle Magazine issue # 112 in August 2016. Basically, I2C is a specialized 2-wire serial communication protocol that allows multiple devices to exist on the same two-wire buss. Each I2C device has an address that we use to talk to that individual device. This month, we’ll work with the Pico as our Microcontroler, a BMP180 Temperature, Pressure and Altitude sensor, and an OLED display. Both the display and sensor communicate to the Pico via I2C, which makes the wiring very easy.

Commençons maintenant notre projet. Nous allons utiliser un capteur du monde réel sur le Pico. Pour connecter le capteur au Pico, nous allons utiliser I2C. Pour un aperçu de l'I2C, vous pouvez régler votre machine à remonter le temps sur le numéro 112 du magazine Full Circle d'août 2016. Fondamentalement, I2C est un protocole de communication série spécialisé à 2 fils qui permet à plusieurs dispositifs d'exister sur le même bus à deux fils. Chaque périphérique I2C a une adresse que nous utilisons pour parler individuellement à ce périphérique.

Ce mois-ci, nous allons travailler avec le Pico comme microcontrôleur, un capteur de température, de pression et d'altitude BMP180 et un écran OLED. L'écran et le capteur communiquent avec le Pico via I2C, ce qui rend le câblage très facile.

As you can see from the wiring diagram shown left, there are only 4 wires needed for each device and they all use the same connection points on the breadboard. To make it easy for you, I’ve created a simple table for the connections to the Raspberry Pi Pico. I’ve tried to make the wire colors consistent with “Normal” conventions. Red for positive voltage, black for ground, white for data, and yellow for clock signals. I suggest that when you make your connections, you do it with the Pico unplugged from your computer. Once you plug it in, fire up Thonny. Whenever I work on a project that uses I2C devices, the first thing I do is to make sure that the Microcontroller that I’m using sees the sensors and/or displays that I plan to use. Sometimes, the jumper wires don’t quite make good contact in the breadboard. This isn’t all that unusual. To do this, I have created a small program (top right) that I keep on the Pico.

Comme vous pouvez le voir sur le schéma de câblage présenté à gauche, il n'y a que 4 fils nécessaires pour chaque dispositif et ils utilisent tous les mêmes points de connexion sur la plaque d'essai. Pour vous faciliter la tâche, j'ai créé un tableau simple pour les connexions au Raspberry Pi Pico.

J'ai essayé de rendre les couleurs des fils conformes aux conventions « normales ». Rouge pour la tension positive, noir pour la terre, blanc pour les données et jaune pour les signaux d'horloge. Je suggère que lorsque vous effectuez vos connexions, vous le fassiez avec le Pico débranché de votre ordinateur. Une fois que vous l'aurez branché, lancez Thonny.

Chaque fois que je travaille sur un projet qui utilise des périphériques I2C, la première chose que je fais est de m'assurer que le microcontrôleur que j'utilise voit les capteurs et/ou les écrans que je prévois d'utiliser. Il arrive parfois que les fils de liaison ne fassent pas un bon contact sur la plaque d'essai. Ce n'est pas si inhabituel. Pour ce faire, j'ai créé un petit programme (en haut à droite) que je garde sur le Pico.

The first thing is to import the machine library from MicroPython. In this program, I assign the I2C pins right away. Since I’m going to be using the I2C buss 0, I’m using GP8 pin (physical pin 11) for the data line (SDA) and the GP9 pin (physical pin 12) for the clock line (SCL). Next, I define the actual buss and create the i2c object. Then I use the i2c.scan method to get a list of the addresses that exist on the buss, and then print that list. Notice that I am using the hex value of the device. When I run it, I get back the following information… MicroPython v1.14 on 2021-03-24; Raspberry Pi Pico with RP2040 Type “help()” for more information. »> %Run -c $EDITOR_CONTENT 0x39 0x3c 0x77 »>

La première chose à faire est d'importer la bibliothèque de la machine depuis MicroPython. Dans ce programme, j'assigne tout de suite les broches I2C. Comme je vais utiliser le bus I2C 0, j'utilise la broche GP8 (broche physique 11) pour la ligne de données (SDA) et la broche GP9 (broche physique 12) pour la ligne d'horloge (SCL). Ensuite, je définis le bus réel et crée l'objet i2c.

Ensuite, j'utilise la méthode i2c.scan pour obtenir une liste des adresses qui existent sur le bus, puis j'imprime cette liste. Remarquez que j'utilise la valeur hexadécimale de l'appareil.

Lorsque je l'exécute, j'obtiens les informations suivantes :

MicroPython v1.14 on 2021-03-24; Raspberry Pi Pico with RP2040 Type “help()” for more information.

%Run -c $EDITOR_CONTENT

0x39 0x3c 0x77

So what do the returned numbers mean? Each of the numbers represent the I2C address for each device on the buss that was found. For this run, the addresses represent the following devices (see image below) Right now, you probably are wondering why I have a TSL2561 luminosity sensor on the buss as well. That’s because the actual breakout board that I have is one that is a number of years old and is a 4-in-1 device that includes the BMP180 and the TSL2561 all together. A number of people whom I’ve talked to have a BMP180 and a BMP280 both. And both are very similar in appearance. This leads to a huge amount of confusion, since the driver library for the BMP180 won’t work with the BMP280, and vice versa. In order to combat this confusion, you can verify which device you are using by doing a simple REPL check by reading memory location 0xD0 on the device. If you get back a 0x55, you are using a BMP180. If, on the other hand, you get back an 0x58, you are using a BMP280. This information comes from the datasheet for the devices. »> from machine import Pin, I2C »> i2c=I2C(0) »> i2c.readfrom_mem(0x77, 0xD0, 2)[0] 85 »> print(hex(85)) 0x55 »>

Alors, que signifient les nombres retournés ? Chacun des nombres représente l'adresse I2C de chaque dispositif sur le bus qui a été trouvé. Pour ce test, les adresses représentent les dispositifs suivants (voir image ci-dessous)

En ce moment, vous vous demandez probablement pourquoi j'ai aussi un capteur de luminosité TSL2561 sur le bus. C'est parce que la carte d'extension que j'ai est vieille de plusieurs années et c'est un dispositif 4-en-1 qui comprend le BMP180 et le TSL2561.

Un certain nombre de personnes à qui j'ai parlé ont un BMP180 et un BMP280. Et les deux sont très similaires en apparence. Cela entraîne une grande confusion, car la bibliothèque de pilotes pour le BMP180 ne fonctionnera pas avec le BMP280, et vice versa. Afin de combattre cette confusion, vous pouvez vérifier quel périphérique vous utilisez en effectuant une simple vérification REPL en lisant l'emplacement mémoire 0xD0 sur le périphérique. Si vous obtenez un 0x55, vous utilisez un BMP180. Si, au contraire, vous obtenez un 0x58, vous utilisez un BMP280. Ces informations proviennent de la fiche technique des appareils.

from machine import Pin, I2C
i2c=I2C(0)
i2c.readfrom_mem(0x77, 0xD0, 2)[0]

85

print(hex(85))

0x55

If you are paying close attention to the code that I’ve presented so far, you will notice a difference in the way that I’m creating the i2c object. The method that I presented in the i2cscan program is the “official” way of doing it. The one that I present in the memory-read way is a somewhat newer way and is much easier. I have a tendency to use the second way, since it uses all of the defaults without having to explicitly define each parameter. I presented the first, so you know the “proper” way, and if you need to change the pin assignments or modify the frequency of the buss up or down, you already have the information. Now that we have verified the existence of the sensor and display, and have everything wired up, let’s get into the code (top right). Download the three files (bmp180.py, BMP180-OLED.py and ssd1306.py) from my github repository (see below) to your local computer. Then you will need to copy the file “bmp180.py” and “ssd1306.py” onto your Pico. You can use the File|Save Copy function in Thonny. The driver libraries have to be on the Pico. While you can run the actual program from your local computer, I suggest that you copy it to the Pico as well, just to keep everything together.

Si vous accordez une attention soutenue au code que j'ai présenté jusqu'ici, vous remarquerez une différence dans la façon dont je crée l'objet i2c. La méthode que j'ai présentée dans le programme i2cscan est la manière « officielle » de le faire. Celle que je présente dans le programme memory-read est un peu plus récente et beaucoup plus facile. J'ai tendance à utiliser la deuxième méthode, car elle utilise tous les paramètres par défaut sans avoir à définir explicitement chaque paramètre. J'ai présenté la première, afin que vous connaissiez la « bonne » façon de faire, et si vous avez besoin de changer l'affectation des broches ou de modifier la fréquence du bus vers le haut ou vers le bas, vous avez déjà l'information.

Maintenant que nous avons vérifié l'existence du capteur et de l'écran, et que tout est câblé, entrons dans le code (en haut à droite). Téléchargez les trois fichiers (bmp180.py, BMP180-OLED.py et ssd1306.py) depuis mon dépôt github (voir plus bas) sur votre ordinateur local. Vous devrez ensuite copier les fichiers « bmp180.py » et « ssd1306.py » sur votre Pico. Vous pouvez utiliser la fonction File|Save Copy (Fichier|Sauvegarder une copie) dans Thonny. Les bibliothèques de pilotes doivent se trouver sur le Pico. Bien que vous puissiez exécuter le programme à partir de votre ordinateur local, je vous suggère de le copier également sur le Pico, pour que tout reste cohérent.

As with any of our Python files, you need to start with the imports that are needed for the program (bottom right). Next, we will set the width and height of our OLED display device. The next three lines deal with configuring the BMP180 sensor. The line that is commented out is the “default” baseline for the barometric sensor. I modified it for where I live in Texas. Your “mileage” will vary. You can get more information on this from https://www.circuitbasics.com/set-bmp180-barometric-pressure-sensor-arduino/ bmp180.oversample_sett = 2 # bmp180.baseline = 101325 bmp180.baseline = 102032 # Modified for my location in Texas

Comme pour tous nos fichiers Python, il faut commencer par les importations nécessaires au programme (en bas à droite). Ensuite, nous allons définir la largeur et la hauteur de notre dispositif d'affichage OLED.

Les trois lignes suivantes concernent la configuration du capteur BMP180. La ligne qui est commentée est la ligne de base « par défaut » pour le capteur barométrique. Je l'ai modifiée pour l'endroit où je vis au Texas. Votre situation variera. Vous pouvez obtenir plus d'informations à ce sujet sur le site https://www.circuitbasics.com/set-bmp180-barometric-pressure-sensor-arduino/.

bmp180.oversample_sett = 2

# bmp180.baseline = 101325

bmp180.baseline = 102032 # Modifié pour ma localisation au Texas

At this point, we’ll clear the OLED display. The .fill(0) command sets all the pixels to 0, which is off or black. Then we’ll set some text starting at column 5, row 5 of the display. We must use the .show() method to actually display the changes. This line will stay the same throughout the run of the program. # Clear the OLED Display oled.fill(0) # Send the header to the OLED oled.text(“BMP180 Demo”,5,5) oled.show() We will now create a “forever” loop (next page, top right) that gets the temperature, pressure and altitude values from the BMP180 and display the temperature on the OLED display.

À ce stade, nous allons effacer l'écran OLED. La commande .fill(0) met tous les pixels à 0, c'est-à-dire à l'état éteint ou noir. Ensuite, nous allons définir un texte commençant à la colonne 5, ligne 5 de l'écran. Nous devons utiliser la méthode .show() pour afficher réellement les changements. Cette ligne restera la même tout au long de l'exécution du programme.

# Effacer l'écran OLED

oled.fill(0)

# Envoyer l'en-tête à l'OLED

oled.text(“BMP180 Demo”,5,5)

oled.show()

Nous allons maintenant créer une boucle « infinie » (page suivante, en haut à droite) qui récupère les valeurs de température, de pression et d'altitude du BMP180 et affiche la température sur l'écran OLED.

Since I don’t do metric very well without having to do a lot of thinking, I’ve added a few lines to deal with the conversions for me. The tempf is the Fahrenheit value from the Celsius value. The variable p is the base pressure reported by the BMP180, which I convert to inches of mercury from the default hectoPascals (hPa). If you want a different output unit of measure, you can again refer to the above mentioned web site. Finally (bottom right), I convert the altitude from meters to feet. Notice that this value seems to change quite a bit, but for our purposes it is close enough. The last few lines of the program provide the output. We print to the REPL terminal the four values Temperature Celsius, Temperature Fahrenheit, Barometric Pressure, and Altitude. It would be much easier if MicroPython supported the Python f-strings, but we live with what we can get. You will notice that there are two lines that output to the OLED display that are very similar. The first prints the temperature at column 5, row 23 and the second prints the same thing in black (with the last parameter as 0), which erases the text after the sleep interval of 2 seconds. With a bit of experimentation, you could modify the column value to only erase the actual temperature value.

Comme je ne suis pas très doué pour le système métrique sans avoir à réfléchir longuement, j'ai ajouté quelques lignes pour gérer les conversions à ma place. La tempf est la valeur Fahrenheit tirée de la valeur Celsius. La variable p est la pression de base rapportée par le BMP180, que je convertis en pouces de mercure à partir des hectoPascals (hPa) par défaut. Si vous souhaitez une unité de mesure de sortie différente, vous pouvez à nouveau vous référer au site Web mentionné ci-dessus. Enfin (en bas à droite), je convertis l'altitude de mètres en pieds. Remarquez que cette valeur semble changer un peu, mais pour nos besoins, elle est suffisament proche.

Les dernières lignes du programme fournissent la sortie. Nous imprimons sur le terminal REPL les quatre valeurs suivantes : température Celsius, température Fahrenheit, pression barométrique et altitude. Ce serait beaucoup plus facile si MicroPython supportait les f-strings de Python, mais nous faisons avec ce que nous pouvons obtenir. Vous remarquerez qu'il y a deux lignes qui sortent sur l'écran OLED qui sont très similaires. La première imprime la température à la colonne 5, ligne 23 et la seconde imprime la même chose en noir (avec le dernier paramètre à 0), ce qui efface le texte après l'intervalle de veille de 2 secondes. Avec quelques essais, vous pouvez modifier la valeur de la colonne pour n'effacer que la valeur réelle de la température.

Your output in Thonny should look something like this… Temp: 23.78C TempF: 74.80 Pressure: 29.78 Altitude 929.1451 Temp: 23.78C TempF: 74.80 Pressure: 29.78 Altitude 931.2545 Temp: 23.79C TempF: 74.82 Pressure: 29.78 Altitude 930.3514 Temp: 23.79C TempF: 74.82 Pressure: 29.78 Altitude 928.817 Temp: 23.79C TempF: 74.82 Pressure: 29.78 Altitude 928.817 Temp: 23.79C TempF: 74.82 Pressure: 29.78 Altitude 929.2014 Temp: 23.80C TempF: 74.84 Pressure: 29.78 Altitude 928.2951 Temp: 23.80C TempF: 74.84 Pressure: 29.78 Altitude 930.7858 Temp: 23.81C TempF: 74.85 Pressure: 29.78 Altitude 930.4326 … Known displays and sensors for the RPi Pico I’ve been really busy testing various sensors and displays that I have on the Pico. I created a list of the sensors that I tested and where I got the driver libraries, since I seem to get a number of questions from people just starting with the Pico. All of these are 3.3volt compliant, and safe to use directly with the RPi Pico. Here is a list of some of the ones that I have verified and a link to the working driver library, where possible, along with any notes that I made during testing…

Votre sortie dans Thonny devrait ressembler à ceci :

Temp: 23.78C TempF: 74.80 Pressure: 29.78 Altitude 929.1451 Temp: 23.78C TempF: 74.80 Pressure: 29.78 Altitude 931.2545 Temp: 23.79C TempF: 74.82 Pressure: 29.78 Altitude 930.3514 Temp: 23.79C TempF: 74.82 Pressure: 29.78 Altitude 928.817 Temp: 23.79C TempF: 74.82 Pressure: 29.78 Altitude 928.817 Temp: 23.79C TempF: 74.82 Pressure: 29.78 Altitude 929.2014 Temp: 23.80C TempF: 74.84 Pressure: 29.78 Altitude 928.2951 Temp: 23.80C TempF: 74.84 Pressure: 29.78 Altitude 930.7858 Temp: 23.81C TempF: 74.85 Pressure: 29.78 Altitude 930.4326 …

Affichages et capteurs connus pour le RPi Pico

J'ai été très occupé à tester les différents capteurs et écrans que j'ai sur le Pico. J'ai créé une liste des capteurs que j'ai testés et de l'endroit où j'ai obtenu les bibliothèques de pilotes, puisque je semble recevoir un certain nombre de questions de la part de personnes qui commencent à utiliser le Pico. Tous ces capteurs sont conformes à la norme 3,3 volts et peuvent être utilisés directement avec le RPi Pico. Voici une liste de quelques-uns que j'ai vérifiés et un lien vers la bibliothèque de pilotes fonctionnels, si possible, ainsi que les notes que j'ai prises pendant les tests :

LSM303DLHC - Acceelerometer + Magnetometer - https://github.com/kamikaze/pyboard-examples/tree/master/imu (Works, but accuracy not verified) Si7021 - Temp/Humidity Sensor - https://github.com/robert-hh/SI7021 Requires small modification - https://github.com/gregwa1953/SI7021-MicroPython-RPi-Pico BMP180 - Temp/Pressure/Altitude Sensor https://github.com/micropython-IMU/micropython-bmp180 (You have to comment out line 47 of the driver self._bmp_i2c.start() to make it work on the Pico). Or you can can find already modified at https://github.com/gregwa1953/FCM168_MicroThisMicroThat DHT22 - Temp/Humidity https://github.com/danjperron/PicoDHT22 TSL2561 - Lux Sensor Works but unsure of values

LSM303DLHC - Acceeleromètre + Magnetomètre - https://github.com/kamikaze/pyboard-examples/tree/master/imu (Fonctionne, mais la précision n'a pas été vérifiée).

Si7021 - Capteur de température/humidité - https://github.com/robert-hh/SI7021 Nécessite une petite modification - https://github.com/gregwa1953/SI7021-MicroPython-RPi-Pico.

BMP180 - Capteur de température/pression/altitude https://github.com/micropython-IMU/micropython-bmp180 (Vous devez commenter la ligne 47 du driver self._bmp_i2c.start() pour qu'il fonctionne sur le Pico). Ou vous pouvez le trouver déjà modifié à https://github.com/gregwa1953/FCM168_MicroThisMicroThat.

DHT22 - Température/Humidité https://github.com/danjperron/PicoDHT22.

TSL2561 - Capteur de luminosité Fonctionne mais pas sûr des valeurs.

IR-08H - Works, but not very sensitive. May need to be calibrated. http://irsensor.wizecode.com/ for information My Pinout - Enable, VCC Out, Gnd OLED1306 - OLED Display 128×32 and 128×64 modes https://github.com/gregwa1953/FCM168_MicroThisMicroThat LCM1602 - 16×2 LCD I2C https://github.com/Bhavithiran97/LCM1602-14_LCD_Library ESP-01 - WiFi - Connects to local network router, but can't get out past there. LCD 16×2 3 volt display https://github.com/Bhavithiran97/LCM1602-14_LCD_Library I will try to set up pages on my github repository for each of these (one has already been done) as time allows.

IR-08H - Fonctionne, mais n'est pas très sensible. Peut avoir besoin d'être calibré. http://irsensor.wizecode.com/ pour information Mon brochage - Enable, VCC Out, Gnd

OLED1306 - Écran OLED avec modes 128×32 et 128×64 https://github.com/gregwa1953/FCM168_MicroThisMicroThat

LCM1602 - 16×2 LCD I2C https://github.com/Bhavithiran97/LCM1602-14_LCD_Library

ESP-01 - WiFi - Se connecte au routeur du réseau local, mais ne peut pas aller au-delà.

Afficheur LCD 16×2 3 volts https://github.com/Bhavithiran97/LCM1602-14_LCD_Library

Je vais essayer de mettre en place des pages sur mon dépôt github pour chacun d'entre eux (l'un a déjà été fait) selon le temps dont je dispose.

Interesting Website information on Microcontrollers (Pico Based) I wanted to provide you with some links to interesting websites that have news and projects about the RPi Pico. https://www.raspberrypi.org/documentation/rp2040/getting-started/ You can also check out Tom’s Hardware website, which has multiple postings about the Pico, as well as the Raspberry Pi and other Microcontrollers - https://www.tomshardware.com/

Sites Web intéressants sur les microcontrôleurs (basés sur le Pico)

Je voulais vous fournir quelques liens vers des sites web intéressants qui ont des informations et des projets sur le RPi Pico.

https://www.raspberrypi.org/documentation/rp2040/getting-started/

Vous pouvez également consulter le site Tom's Hardware, qui contient de nombreux articles sur le Pico, ainsi que sur le Raspberry Pi et d'autres microcontrôleurs - https://www.tomshardware.com/.

Looking to the future In the coming months, I’ll be talking about CircuitPython on the RPi Pico, the Sparkfun ESP32 Thing Plus, the NodeMCU ESP8266, various controllers and displays, connecting the RPi Pico to a MQTT broker either on your network or on the Internet, and much more. My goal here is to provide information about various MicroControllers, sensors and displays that are inexpensive and easy to connect to the various boards. You can find all the code and images from this article at my github repository: https://github.com/gregwa1953/FCM168_MicroThisMicroThat Until next time, as always; stay safe, healthy, positive and creative!

Envisager l'avenir

Dans les mois à venir, je parlerai de CircuitPython sur le RPi Pico, du Sparkfun ESP32 Thing Plus, du NodeMCU ESP8266, de divers contrôleurs et afficheurs, de la connexion du RPi Pico à un « broker » MQTT sur votre réseau ou sur Internet, et de bien d'autres choses encore. Mon but ici est de fournir des informations sur divers microcontrôleurs, capteurs et écrans qui sont peu coûteux et faciles à connecter aux différentes cartes.

Vous pouvez trouver tout le code et les images de cet article sur mon dépôt github : https://github.com/gregwa1953/FCM168_MicroThisMicroThat

Jusqu'à la prochaine fois, comme toujours ; restez en sécurité, en bonne santé, positif et créatif !

issue168/micro.txt · Dernière modification : 2021/05/07 15:29 de andre_domenech