P2 evaluation board (#64000) and Parallax WX ESP8266 WiFi Module - SIP SKU 32420S, wireless how to ?
Alok
Posts: 16
in Propeller 2
I have P2 evaluation board (#64000) and Parallax WX ESP8266 WiFi Module - SIP SKU 32420S, how to get wireless working...? is there a P2 program ( in C/C++ preferably) ...?
-Thanks
-Alok
-Thanks
-Alok
Comments
What do you want to do over WiFi?
You can talk to the P2 using telnet or use it just like you would on a P1.
You can even program the P2 over telnet if you want.
Mike
You would need to custom WiFi module that passed html data directly to the P2 which has not been done.
Mike
http://forums.parallax.com/discussion/172572/wx-wifi-module-html-propeller-control#latest
how do you install lib wifi in flexprop ( C/C++)...? for P2
could you give me instructions on how to install prerequisites so that I can get wifi working
-Thanks
-Alok
In this example I'm building a function to blink LED 56.
The function will be called doblink()
First in Flexprop click on the File menu option and then Library Directories...
In there add a folder where you want to keep your libraries. I used C:\Custom
Next I will build my c function library shown here: I will save this code as myblink.h
Now put the include file above in your custom library location.
Put the C program in a folder called libmyblink to match the above fromfile statement
That's it.
Now here is a sample program that uses this new library function.
Now to move libWifI over is going to take some work as it was built for the WX boards sold by Parallax and this code needs to be removed to work with the P2. In addition it uses the full duplex object for the P1.
Also you don't need this library to use the ESP WX board. Most of the functions use straight text that are shown in the API guide with this product.
Mike
#include "simpletools.h"
#include "wifi.h"
int main()
{
wifi_start(9, 8, 115200, USB_PGM_TERM);
print("Leave a Network\r");
// Leaves network where it was a station and sets
// the Wi-Fi module's mode to AP.
wifi_leave(AP);
// Verify mode after leaving the network.
int mode = wifi_mode(CHECK);
switch(mode)
{
case STA: //0xf4:
print("mode=STA\r");
break;
case AP: //0xf3
print("mode=AP\r");
break;
case STA_AP: //0xf2
print("mode=STA+AP");
break;
}
}
and I am getting following error
/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/simpletext.h:59: error: #error "This library requires 32bit doubles"
They will reveal a couple windows. On the left window, you should see three tabs. The 2nd or 3rd include options for various compile options. One of those is a 32-bit something. (don't recall exactly). But enabling might help.
/include/wifi/wifi.h:83: error: Can't open include file "fdserial.h"
#include "fdserial.h"
from /Users/akmishra/Documents/SimpleIDE/propellar_wifi_alok_1.c: 6: #include "wifi/wifi.h"
1 error in preprocessor.
is there a way to compile program for P2 in simpleIDE ...?