Component: Serial Monitor (Runtime Tools)
Author | Matrix Ltd |
Version | 1.0 |
Category | Runtime Tools |
Contents
Serial Monitor component
Allows data from a COM port to be piped through to the console window for easy program status and debugging.
Component Pack
FREE
Detailed description
No detailed description exists yet for this component
Examples
Here is a simple example showing how to pass data from a device such as an Arduino back into Flowcode for debugging purposes. The example is designed to run on an Arduino Uno R3 with an LED connected to pin D2 and a potentiometer connected to pin A0. The program loops switching the LED on and off and reporting the status to the console, the ADC is also sampled as a voltage string and this is also passed back to the console.
The incoming data can be seen on the Flowcode console even when the simulation is not running.
Outgoing data can be sent back to the embedded hardware by typing data directly into the RX Queue tab of the console.
Downloadable macro reference
![]() |
ReceiveByte |
Attempts to receive a byte using the COM port No valid return data is provided by the return value 256. 0 - 255 indicates valid data. | |
![]() |
Timeout |
![]() |
Return |
![]() |
ClosePort |
Closes the currently open COM port, ending communications and allowing it to be accessed via another application. | |
![]() |
Return |
![]() |
SendByte |
Sends a single byte to be sent out via the COM port. | |
![]() |
Data |
![]() |
Return |
![]() |
SetDTRState |
Allows the DTR signal to be enabled or disabled. | |
![]() |
State |
A value of 0 disables the DTR, 1 or above willl enable the DTR. | |
![]() |
Return |
![]() |
GetConsoleHandle |
Gets the handle to the console allowing data displaying on the panel etc. | |
![]() |
Return |
![]() |
SetFlowControl |
Allows the Flowcontrol signals to be enabled or disabled. | |
![]() |
State |
A value of 0 disables flow control, 1 or above willl enable flow control. | |
![]() |
Return |
![]() |
OpenPort |
Opens the currently selected COM port, allowing data to be sent and received. | |
![]() |
Return |
![]() |
SetProp |
Allows the COM port property to be set from a parent component. | |
![]() |
PropName |
![]() |
PropVal |
![]() |
Return |
![]() |
GetProp |
Allows the property filter for the COM port list to be copied to a parent component. | |
![]() |
PropName |
![]() |
Return |