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
Worked examples HTTP via serial port
-
- Posts: 22
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 11, 2020 8:21 am
-
- 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
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
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
Re: Worked examples HTTP via serial port
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.
-
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Worked examples HTTP via serial port
Hello,
That's exactly what it's about. I just need some working code
That's exactly what it's about. I just need some working code
-
- Valued Contributor
- Posts: 1367
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 330 times
- Been thanked: 475 times
-
- 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
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.
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 389 times
-
- WebSerialPort.fcpx
- (4.73 KiB) Downloaded 386 times
-
- WebComApp 02.fcsx
- (23.1 KiB) Downloaded 378 times
-
- 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
There's an example here if that helps. I'll post it to the component wiki page too.
Lol Steve beat me to it
Lol Steve beat me to it
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- 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
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.