Skip to content

MakeCode extension for WiFi:bit. Connect micro:bit to the Internet through WiFi network.

License

Notifications You must be signed in to change notification settings

SolderedElectronics/pxt-wifi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pxt-wifi

MakeCode extension for WiFi:bit:
alt text
It's used for connecting to the Internet or local network through WiFi connection. You can send or receive information by using HTTP methods or AT commands. WiFi:bit can also be used as breakout board (edge connector).

Commands

Connect to WiFi:bit

alt text
Makes a serial connection between micro:bit and WiFi:bit. You should put it in a start block of every WiFi:bit project.

Connect to WiFi network

alt text
Connects WiFi:bit to WiFi network. You should execute it only once. Next time WiFi:bit will connect automatically.

Disconnect from WiFi network

alt text
Disconnects WiFi:bit from WiFi network. You need this command only if you're paranoid. :)

Execute AT command

alt text
Executes AT command. It's for power users, for total control or cases which can't be covered with other commands. List of AT commands.

Execute HTTP method

alt text
Main command of this extension. It's used for data sending, changing, deleting and fetching by using some of the HTTP methods. This is basic form of command. You can expand it with optional parameters (body and headers).

Blynk: write pin value

alt text
Write Blynk pin value. Blynk is popular IoT service. This command simplifies its usage with WiFi:bit projects.

Blynk: read pin value

alt text
Read Blynk pin value. Blynk is popular IoT service. This command simplifies its usage with WiFi:bit projects.

Newline

alt text
Line separator. It's used in multiline body and headers. You should put it between each pair of lines.

Change HTTP method wait period

alt text
Changes HTTP method wait period. It's for power users and available only in JavaScript part of MakeCode. By defaut HTTP method execution time is cca. 15 seconds. That's OK for almost all networks. If you have good network you can reduce execution time. Default input value is 1000. If you, for example, set it to 500 execution will be twice faster. You can also slow execution by setting a value which is greater than 1000.

Examples

Connect to the Internet

alt text

Send dice value to ThingSpeak

alt text

Send some data to Beebotte

alt text

Read and write Blynk pin values

alt text
For explanation of examples and more details, check official tutorial.

License

MIT License

Supported targets

  • for PXT/microbit

About

MakeCode extension for WiFi:bit. Connect micro:bit to the Internet through WiFi network.

Resources

License

Stars

Watchers

Forks

Packages