Processing control of Ethernet to serial board

Hello,

I would like to use Processing to communicate with an Ethernet to serial device:

https://www.usriot.com/products/serial-ttl-to-ethernet-module.html

“serial to Ethernet” or “Ethernet to serial” references below will be the hardware device.

Some configurations are:

  1. PC (processing) to serial > serial to Ethernet > Ethernet to serial > serial to PC (processing)

  2. PC (processing) to serial > serial to Ethernet > Ethernet to PC (processing)

  3. PC (processing) to Ethernet > Ethernet to serial > serial to Ethernet > Ethernet to PC (processing)

  4. PC (processing) to Ethernet > Ethernet to serial > serial to Processing and/or Arduino

Some will be easier than others. I can confidently handle the Processing to serial code.

The Processing to Ethernet part I have no experience with.
I will start with:
https://processing.org/tutorials/network/
https://processing.org/reference/libraries/net/index.html
http://learningprocessing.com/examples/
And some great references in the forum!

Any thoughts?

Did you make any progress on this problem, @glv?

I did!

I have Processing (client or server) connected to USR-TCP232-T2 (server or client) connected to an Arduino and blinking onboard LED 13.

It does open up some possibilities for a nice HMI interface on Processing side to control the Arduino or any serial device; even another Processing app reading serial port!

Simple code and I will clean it up and post it.

I am now working on HTTPD client in the device sending requests to a server and updating a web page. Using WAMP. Working on web page and learning PHP. Any thoughts on this?

GLV

When you say WAMP, are you passing messages as PHP url variables and storing them in a MySQL database? What kind of information?

Device is:
https://www.usriot.com/products/serial-ttl-to-ethernet-module.html

Arduino is sending serial data (“ON” or “OFF”) to device.
HTTPD client on device is sending data with a GET request to a server.
PHP script on server is saving data to a file.
Web brower client is reading file with a GET request and displaying status of LED.

I now have this working and can start playing with it.

Will replace GET with POST to send data from HTTPD client on device.

glv

I am working on a similar project I just want to know how did you code arduino for this and the library used.
TIA

I am planning to revisit this project in the next couple of weeks and may share some details. I learned so much doing this especially about how web pages work!

I did not use an Arduino library other than the serial libraries (initially); this was later coded without any Arduino libraries and programmed directly into an Atmel microcontroller.

I did explore making an embedded web server and posted this here:

This was just part of the exploration of this device.

This was done with a different device to explore websockets:

Other projects that I worked on were using the Arduino + USR-TCP232-E2 (or USR-TCP232-T2) device to collect and transmit data and a web page to plot data.

I also had this working with Processing libraries; I will find those and share with community at a later time…

glv

I posted an example in the gallery:

:slight_smile: