Worked examples HTTP via serial port

Discuss PC Developer and Web Developer projects and features here.
Post Reply
VIDEOMED
Posts: 22
http://meble-kuchenne.info.pl
Joined: Fri Dec 11, 2020 8:21 am

Worked examples HTTP via serial port

Post by VIDEOMED »

I have several projects made on PIC processors.
All of them have implemented serial connectors.
Please send me an example of how to create an HTTP program (Android, Windows, Linux) that can communicate via a serial port

chipfryer27
Valued Contributor
Posts: 1367
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 330 times
Been thanked: 475 times

Re: Worked examples HTTP via serial port

Post by chipfryer27 »

Hi

You need to be a bit more specific in your requirement.

Android, Linux and Windows already have serial programs that can do such.

What is it you actually want it to do?

Regards

VIDEOMED
Posts: 22
Joined: Fri Dec 11, 2020 8:21 am

Re: Worked examples HTTP via serial port

Post by VIDEOMED »

Maybe I described it wrong. I need an example HTTP code that can download and send data from the PIC device via the serial connector (USB FTDI) and display it on the screen of any PC (Windows, Linux) or Android or Apple device via a web browser.

BenR
Matrix Staff
Posts: 1912
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 496 times
Been thanked: 674 times

Re: Worked examples HTTP via serial port

Post by BenR »

Hello,

The Flowcode web developer now has a component to allow you to do serial communications from inside the web page. Hopefully that's what you're after but if not then let us know.

VIDEOMED
Posts: 22
Joined: Fri Dec 11, 2020 8:21 am

Re: Worked examples HTTP via serial port

Post by VIDEOMED »

Hello,
That's exactly what it's about. I just need some working code

chipfryer27
Valued Contributor
Posts: 1367
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 330 times
Been thanked: 475 times

Re: Worked examples HTTP via serial port

Post by chipfryer27 »

Hi

Have you looked at the WiKi example?

Regards

Steve-Matrix
Matrix Staff
Posts: 1415
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 191 times
Been thanked: 331 times

Re: Worked examples HTTP via serial port

Post by Steve-Matrix »

The Web Developer Serial Port component is not currently finalised, but I have some files and a sample project attached to this post. It should be relatively self-explanatory. Note that the Serial Port component filters the available COM port for connected Arduinos, so set the "Filters" property of the component to a blank string.

The attached "WebSerialPort.fcpx" is the component. This needs to be placed in your "%PROGRAMDATA%\MatrixTSL\FlowcodeV10\Components" folder. Or (perhaps better) you can place it in your own 'extra' component folder which can be specified under "Look for components in..." in the "Locations" tab of "File...Global Settings".

Once added correctly, a SerialPort component should be available under "Components...Helper" when you create a new Web Developer project.

The attached "WebComApp 02.fcsx" file is a Web Developer project file that uses this component to send and receive serial strings. Open this and use the "Create web page" from the "Build" menu to create a web app that runs in the browser. Note that the serial port is not supported within Flowcode's internal browser (under Build...View web page), so you would need to run the created html file directly in a browser.

You would also need a working Embedded app (or existing project which sends and received string data). The attached "EmbeddedApp.fcfx" file is from our "Serial Comms Worked Example" project for PC Developer. The full project for this can be found on our Sample Projects page.
Attachments
EmbeddedApp.fcfx
(16.56 KiB) Downloaded 392 times
WebSerialPort.fcpx
(4.73 KiB) Downloaded 397 times
WebComApp 02.fcsx
(23.1 KiB) Downloaded 384 times

BenR
Matrix Staff
Posts: 1912
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 496 times
Been thanked: 674 times

Re: Worked examples HTTP via serial port

Post by BenR »

There's an example here if that helps. I'll post it to the component wiki page too.
WebComApp.fcsx
(29.78 KiB) Downloaded 569 times

Lol Steve beat me to it :lol:

Steve-Matrix
Matrix Staff
Posts: 1415
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 191 times
Been thanked: 331 times

Re: Worked examples HTTP via serial port

Post by Steve-Matrix »

chipfryer27 wrote:
Tue May 14, 2024 8:17 am
Hi

Have you looked at the WiKi example?

Regards

Unfortunately there are no examples for the Web Developer Serial Port yet (apart from the project in my previous post) because this component is not finalised.

But you are right. There are a few relevant projects on the wiki that might help. For example, there is the "HTTP Comms Worked Example - Web Developer" and "Serial Comms Worked Example - PC Developer" projects near the bottom of this page. These can also be found on the Sample Projects page on this site.

VIDEOMED
Posts: 22
Joined: Fri Dec 11, 2020 8:21 am

Re: Worked examples HTTP via serial port

Post by VIDEOMED »

Thank you very much . I have to do some work

Post Reply