PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Network
WiFi
Switch to STA + AP mode.c
1
/*
2
Application circuit:
3
DO -> P11, DI <- P10, SEL - GND. Use USB cable and the
4
USB COM port for loading code and debugging.
5
6
Note: This example relies on the 0.8 version of the wifi library.
7
Updates may change some function behaviors in later releases.
8
*/
9
10
#include "
simpletools.h
"
11
#include "
wifi.h
"
12
13
int
main
()
14
{
15
wifi_start
(9, 8, 115200,
USB_PGM_TERM
);
16
17
int
mode =
wifi_mode
(
STA_AP
);
18
switch
(mode)
19
{
20
case
STA
:
//0xf4:
21
print
(
"mode=STA\r"
);
22
break
;
23
case
AP
:
//0xf3
24
print
(
"mode=AP\r"
);
25
break
;
26
case
STA_AP
:
//0xf2
27
print
(
"mode=STA+AP"
);
28
break
;
29
}
30
}
wifi.h
API for the Parallax WX Wi-Fi Module ESP8266-WROOM-02 (Part #32420). This library has a preliminary A...
wifi_start
fdserial * wifi_start(int fromDO, int toDI, int baud, int comSelect)
Set up Wi-Fi module serial connections for data command and transparent data communication.
Definition:
wifi.c:47
STA
#define STA
Token used for both setting up and indicating station mode. In this mode, the Wi-Fi module is a stati...
Definition:
wifi.h:314
wifi_mode
int wifi_mode(int mode)
Set or check the Wi-Fi module's network mode.
Definition:
mode.c:48
STA_AP
#define STA_AP
Token used for both setting up and indicating station plus access point mode. This mode should only b...
Definition:
wifi.h:327
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
print
int print(const char *format,...) __attribute__((format(printf
Print format "..." args to the default simple terminal device. The output is limited to 256 bytes.
USB_PGM_TERM
#define USB_PGM_TERM
Definition:
wifi.h:114
AP
#define AP
Token that can be used for both setting up and checking the Wi-Fi module's access point mode....
Definition:
wifi.h:259
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17