Skip to content

Pico W600

reichart edited this page Oct 31, 2023 · 20 revisions

8 dépôts github : exemples-de-montages festisol CROUS-micro-python piano visio anumby jouets developpement-voiture raspberry-pico Blog ateliers numériques Repair Café d'Orsay

le nouveau processeur W600 est économique, peu puissant avec 1Mo de mémoire mais très agréable avec le wifi que n'avait pas le raspberry pico d'origine

interface

image

faire clignoter la LED interne

from machine import Pin
import time
led = Pin(Pin.PA_00, Pin.OUT, Pin.PULL_FLOATING)
while True:
     led.value(1)
     time.sleep(0.2)
     led.value(0)
     time.sleep(0.2)

connexion internet

la bibliothèque easyw600 est très intéressante

 import easyw600
 easyw600.connect("NAME OF ACCESS POINT","PASSWORD")

création d'un point d'accès internet

 import easyw600
 easyw600.createap()

création d'un serveur ftp

 import easyw600
 easyw600.ftpserver()

image

Les transferts de fichiers sont possibles : ici, j'ai pris Filezilla sous Linux

image

un switch WIFI

un switch WIFI pour une installation de domotique ici

image

un serveur WIFI

image

essai avec le microPython livré en usine

image

avec un bouton

image

J'ai utilisé le mode d'emploi du constructeur ici

j'utilise l'interface arduino pour allumer la LED interne

image

MicroPython v1.10-282-g6a9b3cb-dirty on 2019-09-17; WinnerMicro module with W600

Type "help()" for more information.

from machine import Pin

led = Pin(Pin.PA_00, Pin.OUT, Pin.PULL_FLOATING)

led.value(1)

led.value(0)

led.value(1)

led.value(0)

help()

Welcome to MicroPython on the W600!

For generic online docs please visit http://docs.micropython.org/

For access to the hardware use the 'machine' module:

import machine

pb26 = machine.Pin(machine.Pin.PB_26, machine.Pin.OUT, machine.Pin.PULL_DOWN)

pb26.value(1)

pb27 = machine.Pin(machine.Pin.PB_27, machine.Pin.IN, machine.Pin.PULL_UP)

print(pb27.value())

Basic WiFi configuration:

import network

sta_if = network.WLAN(network.STA_IF)

sta_if.active(True)

sta_if.scan() # Scan for available access points

sta_if.connect("<AP_name>", "") # Connect to an AP

sta_if.isconnected() # Check for successful connection

Control commands:

CTRL-A -- on a blank line, enter raw REPL mode

CTRL-B -- on a blank line, enter normal REPL mode

CTRL-C -- interrupt a running program

CTRL-D -- on a blank line, do a soft reset of the board

CTRL-E -- on a blank line, enter paste mode

For further help on a specific object, type help(obj)

For a list of available modules, type help('modules')

led.value(0)

led.value(1)

led.value(0)

référence

image

https://sigmdel.ca/michel/ha/w600/second_look_w600_en.html

aller plus loin avec des Exemples de montages faciles et le cours micro python de Chris ici