issue196: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 | ||
issue196:micro-ci_micro-la [2023/08/25 18:04] – créée auntiee | issue196:micro-ci_micro-la [2023/08/29 17:05] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | + | **OHHHHH WIIIIO … WIOOOOOO | |
- | OHHHHH WIIIIO … WIOOOOOO | + | |
Greetings again, fellow beings. It’s me again, broadcasting from across the known universe! | Greetings again, fellow beings. It’s me again, broadcasting from across the known universe! | ||
Ligne 10: | Ligne 9: | ||
It’s talking about the Wio Terminal from Seeed Studio (YES with all the “e’s” in Seeed). | It’s talking about the Wio Terminal from Seeed Studio (YES with all the “e’s” in Seeed). | ||
- | It’s a REALLY neat little device that has a HUGE amount of potential and has recently gotten micropython support. | + | It’s a REALLY neat little device that has a HUGE amount of potential and has recently gotten micropython support.** |
- | If you look REALLY close at the top of the image, you will see three little blue bumps on the left side of the device. That’s three user defined buttons. At the bottom-right of the device, there’s a four-way thumb pad that also can be depressed for a fifth button for a total of 8 buttons. | + | OHHHHH WIIIIO ... WIOOOOOO |
+ | |||
+ | Je vous salue à nouveau, chers amis. C'est encore moi, diffusant depuis l' | ||
+ | |||
+ | Awwww, ok. Pas de l' | ||
+ | |||
+ | Tout d' | ||
+ | |||
+ | Il s'agit du terminal Wio de Seeed Studio (OUI avec tous les « e » de Seeed). | ||
+ | |||
+ | C'est un petit appareil VRAIMENT sympa qui a un énorme potentiel et qui a récemment obtenu le support de micropython. | ||
+ | |||
+ | |||
+ | **If you look REALLY close at the top of the image, you will see three little blue bumps on the left side of the device. That’s three user defined buttons. At the bottom-right of the device, there’s a four-way thumb pad that also can be depressed for a fifth button for a total of 8 buttons. | ||
The screen is a 2.4” 320x240 touchscreen and there is an onboard IMU(LIS3DHTR), | The screen is a 2.4” 320x240 touchscreen and there is an onboard IMU(LIS3DHTR), | ||
- | In addition to all of that, there is a Raspberry Pi 40-pin Compatible GPIO female header on the back that should allow you to use any RPi that that you might have, if you happen to have Micropython drivers for them. One more thing of note (at the moment), the Wio has 512KB of Program memory, 4MB of External Flash memory, and has 192KB of ram. | + | In addition to all of that, there is a Raspberry Pi 40-pin Compatible GPIO female header on the back that should allow you to use any RPi that that you might have, if you happen to have Micropython drivers for them. One more thing of note (at the moment), the Wio has 512KB of Program memory, 4MB of External Flash memory, and has 192KB of ram.** |
+ | |||
+ | Si vous regardez VRAIMENT de près en haut de l' | ||
+ | |||
+ | L' | ||
+ | |||
+ | En plus de tout cela, il y a un connecteur femelle Raspberry Pi 40 broches compatible GPIO à l' | ||
- | There is also WiFi and bluetooth. I must admit that I don’t think the touchscreen interface, WiFi and bluetooth are working quite yet. I have also seen some comments that I2C and SPI don’t work well at this point, but I haven’t had a chance to test those yet. | + | **There is also WiFi and bluetooth. I must admit that I don’t think the touchscreen interface, WiFi and bluetooth are working quite yet. I have also seen some comments that I2C and SPI don’t work well at this point, but I haven’t had a chance to test those yet. |
All of this for about $45 USD makes this a great little device to test out. So, let’s get started! | All of this for about $45 USD makes this a great little device to test out. So, let’s get started! | ||
Ligne 30: | Ligne 49: | ||
$ ls /dev/tty* | $ ls /dev/tty* | ||
- | This should show you all the tty ports and you should (by this point) be able to figure out which one the Wio is plugged into. | + | This should show you all the tty ports and you should (by this point) be able to figure out which one the Wio is plugged into.** |
- | Now, here is the difficult part. You need to put the Wio into bootloader mode. The power switch on the left side of the device has three positions. Up is off, middle position is on, and down is a momentary position for reset. Push the switch all the way down twice very quickly. It can take a number of seconds to “kick in”, but just like with the RPi Pico, you should see a new File browser window open. Now drag and drop the UF2 file you just downloaded into the File Browser window and wait about 10 seconds. Once the window disappears, you are ready to go. | + | Il y a aussi le WiFi et le bluetooth. Je dois avouer que je ne pense pas que l' |
- | Now open Thonny and select the Generic Micropython on your USB port. In a moment, you should see the REPL show the Micropython version and prompt. | + | Tout cela pour environ 45 $ US, ce qui en fait un excellent petit appareil à tester. Alors, c'est parti ! |
- | PROJECT 1 - LED | + | Chargement de Micropython |
+ | |||
+ | Avant de commencer, nous devons charger Micropython sur l' | ||
+ | |||
+ | Ensuite, branchez l' | ||
+ | |||
+ | $ ls /dev/tty* | ||
+ | |||
+ | Cela devrait vous montrer tous les ports tty et vous devriez (à ce stade) être en mesure de déterminer celui sur lequel le Wio est branché. | ||
+ | |||
+ | |||
+ | **Now, here is the difficult part. You need to put the Wio into bootloader mode. The power switch on the left side of the device has three positions. Up is off, middle position is on, and down is a momentary position for reset. Push the switch all the way down twice very quickly. It can take a number of seconds to “kick in”, but just like with the RPi Pico, you should see a new File browser window open. Now drag and drop the UF2 file you just downloaded into the File Browser window and wait about 10 seconds. Once the window disappears, you are ready to go. | ||
+ | |||
+ | Now open Thonny and select the Generic Micropython on your USB port. In a moment, you should see the REPL show the Micropython version and prompt.** | ||
+ | |||
+ | Maintenant, voici la partie difficile. Vous devez mettre le Wio en mode bootloader. L' | ||
+ | |||
+ | Ouvrez Thonny et sélectionnez le Generic Micropython sur votre port USB. Dans un instant, vous devriez voir la REPL afficher la version de Micropython et l' | ||
+ | |||
+ | |||
+ | **PROJECT 1 - LED | ||
There is a blue LED inside the Wio just to the left of the USB-C connector. In this simple project, we’ll make it flash. | There is a blue LED inside the Wio just to the left of the USB-C connector. In this simple project, we’ll make it flash. | ||
Ligne 42: | Ligne 81: | ||
Copy this code (top right) into your Thonny code window and save it to the Wio as “wio_terminal_LED.py”. | Copy this code (top right) into your Thonny code window and save it to the Wio as “wio_terminal_LED.py”. | ||
- | Now run it. If everything works, in a couple of seconds look at the bottom of the Wio just to the left of the USB connector. You should see the LED flashing. To get it to stop, you can reset the Wio, turn it off for a moment, or press the stop button in Thonny. | + | Now run it. If everything works, in a couple of seconds look at the bottom of the Wio just to the left of the USB connector. You should see the LED flashing. To get it to stop, you can reset the Wio, turn it off for a moment, or press the stop button in Thonny.** |
- | Project 2 - Button Test | + | PROJET 1 - LED |
+ | |||
+ | Une LED bleue se trouve à l' | ||
+ | |||
+ | Copiez ce code (en haut à droite) dans votre fenêtre de code Thonny et enregistrez-le sur le Wio sous « wio_terminal_LED.py ». | ||
+ | |||
+ | Lancez-le. Si tout fonctionne, dans quelques secondes, regardez en bas du Wio, juste à gauche du connecteur USB. Vous devriez voir la LED clignoter. Pour l' | ||
+ | |||
+ | **Project 2 - Button Test | ||
I REALLY wanted to call this section “Button, Button, Who pressed the button”, but I didn’t. Aren’t you glad? | I REALLY wanted to call this section “Button, Button, Who pressed the button”, but I didn’t. Aren’t you glad? | ||
Ligne 54: | Ligne 101: | ||
The first part of the program does the imports and creates a list with the names of the buttons. The WIO apparently has three ways to name the pins. First is a string like “BUTTON_3”, | The first part of the program does the imports and creates a list with the names of the buttons. The WIO apparently has three ways to name the pins. First is a string like “BUTTON_3”, | ||
- | The diagram (next page) is available at https:// | + | The diagram (next page) is available at https:// |
- | Anyway, the rest of the code (bottom left) handles setting up the actual pins, and then looping until a button is pressed. Then it will print a “1” for which of the 8 pins was pressed. The output in the REPL is a simple string of 8 zeros like this “00000000”. The far left position is the top left button, the next position is the top middle button, and so on, ending with the thumb pad press button. | + | Projet 2 - Test des boutons |
+ | |||
+ | J' | ||
+ | |||
+ | Ce prochain projet testera les 8 boutons de l' | ||
+ | |||
+ | Récupérez le code (en bas à droite) et nommez-le « Wio_terminal_Buttons.py ». Copiez-le dans la mémoire du Wio. | ||
+ | |||
+ | La première partie du programme fait les importations et crée une liste avec les noms des boutons. Le WIO a apparemment trois façons de nommer les broches. La première est une chaîne comme « BUTTON_3 », la deuxième est une définition de broche et la troisième est une définition de broche utilisant un schéma comme le nom GPIO, mais nommée selon les spécifications du WIO. | ||
+ | |||
+ | Le diagramme (page suivante) est disponible à l' | ||
+ | |||
+ | |||
+ | **Anyway, the rest of the code (bottom left) handles setting up the actual pins, and then looping until a button is pressed. Then it will print a “1” for which of the 8 pins was pressed. The output in the REPL is a simple string of 8 zeros like this “00000000”. The far left position is the top left button, the next position is the top middle button, and so on, ending with the thumb pad press button. | ||
So when you run the program, the output in the REPL continually prints | So when you run the program, the output in the REPL continually prints | ||
Ligne 64: | Ligne 124: | ||
Until one of the buttons is pressed. Then that position turns to a “1” until the button is released. Since the program polls all the button pins, you could see multiple “1”s in the string of zeros. For example, if you pressed all three of the top buttons at the same time, you would see | Until one of the buttons is pressed. Then that position turns to a “1” until the button is released. Since the program polls all the button pins, you could see multiple “1”s in the string of zeros. For example, if you pressed all three of the top buttons at the same time, you would see | ||
+ | |||
+ | 11100000** | ||
+ | |||
+ | Quoi qu'il en soit, le reste du code (en bas à gauche) s' | ||
+ | |||
+ | Ainsi, lorsque vous exécutez le programme, la sortie dans le REPL affiche continuellement | ||
+ | |||
+ | 0000000 | ||
+ | |||
+ | jusqu' | ||
11100000 | 11100000 | ||
- | Project 3 - Graphics on the screen | + | |
+ | **Project 3 - Graphics on the screen | ||
Now for the hard project. It is a series of coloured diamonds animated on the screen. For this, you need to download the screen driver from https:// | Now for the hard project. It is a series of coloured diamonds animated on the screen. For this, you need to download the screen driver from https:// | ||
Ligne 74: | Ligne 145: | ||
The next function (bottom right) (wheel565) takes a value and returns a RGB color value. | The next function (bottom right) (wheel565) takes a value and returns a RGB color value. | ||
- | Next (top right), the LED that we played with in Project 1 is used to signal things are working. | + | Next (top right), the LED that we played with in Project 1 is used to signal things are working. |
+ | |||
+ | Projet 3 - Graphiques à l' | ||
+ | |||
+ | Passons maintenant au projet le plus difficile. Il s'agit d'une série animée de diamants colorés à l' | ||
+ | |||
+ | Cette première partie est simplement l' | ||
+ | |||
+ | La fonction suivante (en bas à droite) (wheel565) prend une valeur et renvoie une valeur de couleur RVB. | ||
+ | Ensuite (en haut à droite), la LED avec laquelle nous avons joué dans le projet 1 est utilisée pour signaler que les choses fonctionnent. L' | ||
- | The next bit of code (bottom right) creates the coloured pixels and coloured rectangles, draws them on the screen and then keeps looping. | + | **The next bit of code (bottom right) creates the coloured pixels and coloured rectangles, draws them on the screen and then keeps looping. |
Finally, if the program is ended, the backlight is turned off, the led is turned off, and the display itself is turned off. | Finally, if the program is ended, the backlight is turned off, the led is turned off, and the display itself is turned off. | ||
Ligne 84: | Ligne 165: | ||
| | ||
- | Name the program “wio_terminal_screen.py”. When you run it, you will see something like this (and in MUCH better definition and animation). | + | Name the program “wio_terminal_screen.py”. When you run it, you will see something like this (and in MUCH better definition and animation).** |
- | I’m running out of time and space here, so I’m going to leave you hanging on this for now. I haven’t really had much chance to test any more of the WIO either I2C support, WiFi support or any further into the Screen library. | + | Le morceau de code suivant (en bas à droite) crée les pixels et les rectangles colorés, les dessine sur l' |
+ | |||
+ | Enfin, si le programme est terminé, le rétroéclairage est éteint, les diodes sont éteintes et l' | ||
+ | |||
+ | Ce code provient du site web : https:// | ||
+ | |||
+ | Nommez le programme « wio_terminal_screen.py ». Lorsque vous l' | ||
+ | |||
+ | |||
+ | **I’m running out of time and space here, so I’m going to leave you hanging on this for now. I haven’t really had much chance to test any more of the WIO either I2C support, WiFi support or any further into the Screen library. | ||
Until then, if you are interested in learning more about the WIO Terminal, here are some good links to get you started… | Until then, if you are interested in learning more about the WIO Terminal, here are some good links to get you started… | ||
Ligne 95: | Ligne 185: | ||
The next link is to a site with a number of good projects and is where I got the three projects for you. | The next link is to a site with a number of good projects and is where I got the three projects for you. | ||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | Je manque de temps et d' | ||
+ | |||
+ | D'ici là, si vous souhaitez en savoir plus sur le terminal WIO, voici quelques bons liens pour commencer : | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | Le lien suivant mène à un site contenant un certain nombre de bons projets et c'est là que j'ai obtenu pour vous les trois projets. | ||
https:// | https:// | ||
Ligne 100: | Ligne 203: | ||
- | As I often try to do, I have put the three project files and the base screen driver in a github repository at https:// | + | **As I often try to do, I have put the three project files and the base screen driver in a github repository at https:// |
By the way, neither Full Circle Magazine nor I get paid or receive free products for any of the devices that I review here. | By the way, neither Full Circle Magazine nor I get paid or receive free products for any of the devices that I review here. | ||
- | Until then, as always; stay safe, healthy, positive and creative! | + | Until then, as always; stay safe, healthy, positive and creative!** |
+ | |||
+ | Comme j' | ||
+ | |||
+ | À ce propos, ni le Full Circle Magazine, ni moi, ne sommes payés ou recevons des produits gratuits pour aucun des dispositifs dont je fais la critique ici. | ||
+ | |||
+ | Comme d' |
issue196/micro-ci_micro-la.1692979489.txt.gz · Dernière modification : 2023/08/25 18:04 de auntiee