WiFi Wrapper | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar
Please consider registering
guest
sp_LogInOut Log In sp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
WiFi Wrapper
October 21, 2015
8:43 pm
Avatar
LubomirJagos
Member
Members
Forum Posts: 21
Member Since:
August 4, 2015
sp_UserOfflineSmall Offline

Hi all,

few weeks ago I noticed, that it's possible to compile code with Arduino IDE and deploy it for ESP8266 modules. I own few of them and already tried it with NodeMCU, which looks cool and useful, after I found out possibility do the same with Arduino and because now I played for while with LabVIEW arduino compiler I started to thinking about using LabVIEW with these modules. 

But there wasn't any port of wifi libraries for LabVIEW compiler, so I created one. I spent last few days improving it and make sure that it's running properly. I think that biggest problem is outdated documentation on official arduino webpage, but there is doc in source code :)

Basically I ported most of functions from official documentation except UDP ones.

I tested this library with ESP8266-01 modules like this https://kaspars.net/wp-content.....rduino.jpg but I didn't make any test for Arduino with wifi shield, but placed there block called 'Arduino Target.vi' which instead wifi libs include libs for arduino. Maybe someone will try it, I'll see.

I think that usage most of the VIs is obvious, I put there examples where you can see how to wire it together. Most important examples are Tests --> Advanced test --> Simple Web Server and Connect to Simple Web Server. If you deploy examples as they are for nodes and attach one or both of them to serial port, you will see in server case responds for requests and in client case answers from server.

You can connect to this wireless server also by your mobile, default name until you change it (set up control values and Edit->Make current values default) is 'ESP8266 Wifi Example' and password '12345678'. Be careful when changing password to put at least 8 characters, otherwise your network would have default name set up by MCU.

There are pictures of palettes, you have to create your own ones, until I figure out how to sent it together with library and also picture of ESP8266 package for Arduino IDE, how to install it is here: https://learn.sparkfun.com/tut.....uino-addon

So enough writing, I hope that this would be useful for you, it is last missing piece for me to start really play with ESP modules (because using ESP modules without wifi sounds really odd :D)

In the end, password for all VIs is 'esp'. Good night!

wifi_client_palette.pngImage Enlargerwifi_palette.pngImage Enlargerarduino_ide_esp8266_install.pngImage Enlarger

October 25, 2015
2:56 pm
Avatar
LubomirJagos
Member
Members
Forum Posts: 21
Member Since:
August 4, 2015
sp_UserOfflineSmall Offline

Hello,

so I had time and made few changes:

  • added UDP handling functions
  • repair support for arduino - I made it so that's able to compile, but it's NOT TESTED

I put there examples in Tests --> Advanced Tests --> Simple UDP Server, Simple UDP Client. If you download them into two nodes and connect them via Serial to pc, you have to see output as on picture which I made from TeraTerm.

WiFi-UDP-test.pngImage Enlarger

sp_PlupAttachments Attachments
October 25, 2015
4:16 pm
Avatar
filipealtoe
Admin
Forum Posts: 98
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

This is great work Lubomir! Thanks for sharing it with the community.

Filipe

Cheers
Filipe

December 23, 2015
10:44 pm
Avatar
tronron
Member
Members
Forum Posts: 21
Member Since:
August 5, 2015
sp_UserOfflineSmall Offline

Hi Lubomir,

This looks extremely useful!. I am experimenting with ESP8266 for Wi Fi lighting control and like to code in labview. I have successfully compiled code for the ESP 8266 also, but without any wi fi capability, which I have in basic Arduino and NodeMCU.

 

I have downloaded your zip file and unzipped it. The next steps are not clear to me. I somehow have to get ACC4LV to recognize the primitives so that I can place them in the palette, but I'm not sure how. Do you have some simple steps I can follow?

Ron

December 26, 2015
2:33 am
Avatar
LubomirJagos
Member
Members
Forum Posts: 21
Member Since:
August 4, 2015
sp_UserOfflineSmall Offline

Hi Ron,

I created this library because I wanted to do exactly the same and it's possible. I put there picture of pallete but it's my customized pallete in LabVIEW, you can try this tutorial http://zone.ni.com/reference/e.....ing_a_pal/ all what you have to do is put there VIs from library or you can use it when you drag them from library.

There is directory 'C:\Program Files\National Instruments\LabVIEW 2014\vi.lib\Aledyne-TSXperts\Arduino Compatible Compiler for LabVIEW\addons\ESP8266 WiFi Wrapper\tests\Advanced Tests' (in my case) where I put simple examples, how to create http server, how to connect to it and UDP example of server and client connection.

Unluckily I'm for now busy at university because I have to finish my last year, but I'll try to put here some tutorial or I'll put into archive pallete files 🙂 What you want to do is possible, with this library so don't give it up 😀

If you would have some problems, please write a comment, I know that it looks inactive for now, but that's only because I had to focused all my energy into university 😀

Regards Lubomir

December 26, 2015
4:48 pm
Avatar
tronron
Member
Members
Forum Posts: 21
Member Since:
August 5, 2015
sp_UserOfflineSmall Offline

Thank you for responding Lubomir! I managed to get everything installed and I can compile and successfully download your "simple web server" and "connect to simple web server" vi's. Good luck at University, and thank you for providing this WiFi wrapper. It's really neat work.

February 25, 2016
4:17 pm
Avatar
tronron
Member
Members
Forum Posts: 21
Member Since:
August 5, 2015
sp_UserOfflineSmall Offline

Colleagues,

I've managed to get the simple web server example up and running. I can log onto the SSID generated by the ESP, send commands from any web browser, and act on them within the Labview code. It works great! However, as written, the ESP generates a "standalone network". I would like to have the ESP log on as a "station" to an existing network, and respond identically to the above. I tried changing the WiFi mode to STA, but this doesn't work. Does anyone know how to accomplish this? I hoped it was a minor edit, but maybe not.

Regards,

tronron

July 4, 2016
10:42 am
Avatar
hollytech0103
New Member
Members
Forum Posts: 1
Member Since:
July 4, 2016
sp_UserOfflineSmall Offline

Amazing and interesting. Like it. I prefer arduino wifi shield for my arduino project. It also good and very helpful for me. Thanks. 

Image Enlarger

Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
5
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
miche91: 33
scottj: 28
scadao: 23
Member Stats:
Guest Posters: 5
Members: 202
Moderators: 0
Admins: 3
Forum Stats:
Groups: 1
Forums: 2
Topics: 266
Posts: 1222
Newest Members:
pujacontrol
Administrators: geadmin: 22, filipealtoe: 96, Steffan: 356