Any SPIN programs interfacing to wi-fi modules WX ESP8266 or ESP32?
macrobeak
Posts: 354
in Propeller 1
Hi,
Is anyone aware of any sample SPIN programs for the above wi-fi modules?
I have done a search of obex and the web I cannot find any.
Many thanks . .
Is anyone aware of any sample SPIN programs for the above wi-fi modules?
I have done a search of obex and the web I cannot find any.
Many thanks . .
Comments
Was it Rayman?
https://forums.parallax.com/discussion/160533/serial-communication-with-the-esp8266-using-the-nodemcu-firmware-script-languagelua
of course it depends what you want to do
I used ESP8266 loaded with NodeMCU running the Lua interpreter interactively.
So you just send Lua commands via serial.
You don't need any special object for this except SERIAL
I use the wx device's serial port with fullduplexserialplus on the prop to send ANSI ESCAPE control codes using the telnet port 23 with putty.
Its a nice way to format the debug output.
Example code is just dumping ansi codes to the serial input on the wx device.. Its pretty simple.
Connect to port 23 of the ip for your wx device using putty.
Get one of these:
https://www.parallax.com/product/32420s
The propeller RES pin goes to the WX RES pin. (gpio12, DTR)
The propeller TX pin goes to the WX DI pin.
The propeller RX pin goes to the WX DO pin.
Connect the wx device to your network and open its ip address.
The propeller wx page should show.
From there you can upload a new copy of the latest firmware if there are any (https://github.com/parallaxinc/Parallax-ESP/releases)
If you compile the above prop code i attached, using the PropellerTool software https://www.parallax.com/sites/default/files/downloads/P8X32A-Setup-Propeller-Tool-v1.3.2.zip
Generate a binary by pressing F8, and save the binary to c:\temp\propcode.binary
You can download and extract the proploader to c:\temp\proploader.exe https://github.com/parallaxinc/PropLoader/releases/download/v1.0-37/proploader-win.zip
Then run this by pressing the start button, search for program, type in cmd.exe
press enter and open the program when it finds it
that opens a command prompt, then paste this command.
you WILL need to change yourwxnameoripaddresshere to your actual wx ip address or name.
It will upload the code to your prop connected to the wx device on wifi.
Then you need putty https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
And open a connection in putty, telnet port 23 on address: yourwxnameoripaddresshere
So now you can wirelessly program, and view the debug output of any propeller based project with the parallax wx device, and these instructions.
"I'll buy that for a dollar"
Simple fix:
dgately
Excellent catch, no idea how it slipped in. Original fixed.
I suppose i could have made the timer code actually work by including the proper code..
But, this was just a demo on how to format ansi command codes to a ansi compatible terminal program over telnet.... didn't want to add more complications that might confuse.. thanks again!!
(ANSI Escape codes)
http://ascii-table.com/ansi-escape-sequences.php
I have not tested all these sequences with putty, use at your own risk. (of confusion)
You can also, using putty, and either the WX device or a simple serial port, view ANS files directly with the propeller, and putty.
Like this:
You can find all kinds of .ANS files here
http://artscene.textfiles.com/
http://pc.textmod.es
The full code is attached which contains the join.ans file.
Playscii
http://vectorpoem.com/playscii/
I generated an ANSI image of the parallax logo using it.
But it doesn't work, so if anyone wants to figure out why the ansi files made by playscii will not work..
The ANSI for the storm trooper was found here:
http://blocktronics.org/artpacks/
The Blocktronics Detention Block AA-23
You can see rendering of the pack here
http://pc.textmod.es/pack/blocktronics_detention_block_aa-23/
I didn't mean to make this about ANSI stuff.
Just showing that ANSI terminals are pretty useful with microcontrollers.