Component: Matrix Cap Touch Display (Development)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category Development


Matrix Cap Touch Display component

A component to drive the capacitive touch display module as used in EM, 3PH PSU, CNC

Detailed description

No detailed description exists yet for this component

Examples

Auto Detect Port Number

This example auto detects and opens a COM Port based on preassigned USB Identifiers VID/PID.

For a known device the VID and PID can be found via Windows device manager.

FC6 Icon.png Auto Detect Example







Macro reference

BluetoothConnectionStatus

Fc9-comp-macro.png BluetoothConnectionStatus
Checks to see if the Bluetooth is connected to a master device 
Fc9-bool-icon.png - BOOL Return


BluetoothInit

Fc9-comp-macro.png BluetoothInit
Startup up Bluetooth communications and assigns a friendly name  
Fc9-string-icon.png - STRING Name
Friendly device name 
Fc9-void-icon.png - VOID Return


BluetoothReceiveArray

Fc9-comp-macro.png BluetoothReceiveArray
Read an array of bytes from the Bluetooth connection Returns the number of bytes read from the file 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u16-icon.png - UINT Count
 
Fc9-u16-icon.png - UINT Return


BluetoothSendArray

Fc9-comp-macro.png BluetoothSendArray
Send an array of bytes via Bluetooth 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u16-icon.png - UINT Count
 
Fc9-void-icon.png - VOID Return


BluetoothUninit

Fc9-comp-macro.png BluetoothUninit
Shots down Bluetooth communications  
Fc9-void-icon.png - VOID Return


ClearDisplay

Fc9-comp-macro.png ClearDisplay
Clears the display and resets the button count 
Fc9-void-icon.png - VOID Return


DrawArc

Fc9-comp-macro.png DrawArc
Draws an arc either as an outline or as a filled object. 
Fc9-u16-icon.png - UINT X1
Center X coordinate 
Fc9-u16-icon.png - UINT Y1
Center Y coordinate 
Fc9-u16-icon.png - UINT Radius
Radius, distance of edge from the centre coordinates 
Fc9-u16-icon.png - UINT StartAngle
Angle to start drawing, in degrees 
Fc9-u16-icon.png - UINT EndAngle
Angle to end drawing, in degrees 
Fc9-u16-icon.png - UINT Resolution
Number of lines to draw from the center to the outer edge, 0=Autofill 
Fc9-u8-icon.png - BYTE Transparent
Chooses the transparency - 0 = Arc contains background colour, 1 = Arc contains previous pixel data. 
Fc9-u8-icon.png - BYTE Solid
Chooses to fill with colour - 0 = Arc transparency data, 1 = Arc contains foreground colour. 
Fc9-void-icon.png - VOID Return


DrawBitmap

Fc9-comp-macro.png DrawBitmap
Draws a bitmap image loaded from the SD card FileInit must be called first to ensure the File System is setup. 
Fc9-string-icon.png - STRING Filename
Text label to draw on the button 
Fc9-u16-icon.png - UINT X1
 
Fc9-u16-icon.png - UINT Y1
 
Fc9-u8-icon.png - BYTE Transparency
Set the button type 
Fc9-u8-icon.png - BYTE Orientation
 
Fc9-u8-icon.png - BYTE Flip
 
Fc9-u8-icon.png - BYTE Return


DrawButton

Fc9-comp-macro.png DrawButton
Draws a button or slider that can be touched  
Fc9-u16-icon.png - UINT X
 
Fc9-u16-icon.png - UINT Y
 
Fc9-u16-icon.png - UINT Width
 
Fc9-u16-icon.png - UINT Height
 
Fc9-u8-icon.png - BYTE Type
Set the button type: 0=Rect, 1=RoundRect, 2=Ellipse, 3=Bitmap, 4=VSlider, 5=HSlider, 6=RVSlider, 7=RHSlider 
Fc9-u8-icon.png - BYTE Font
Range: 0-3 
Fc9-u8-icon.png - BYTE ThemeIndex
 
Fc9-string-icon.png - STRING Text
Text label to draw on the button 
Fc9-u8-icon.png - BYTE SliderMode
0=HighlightOnly, 1=Highlight and Lowlight 
Fc9-u8-icon.png - BYTE Return


DrawEllipse

Fc9-comp-macro.png DrawEllipse
Draws a ellipse centered around X,Y with radius X2,Y2  
Fc9-u16-icon.png - UINT X1
 
Fc9-u16-icon.png - UINT Y1
 
Fc9-u16-icon.png - UINT Width
 
Fc9-u16-icon.png - UINT Height
 
Fc9-bool-icon.png - BOOL Transparent
When Solid=0 - 0 = Fill with Background / 1 = No Fill 
Fc9-bool-icon.png - BOOL Solid
0=Foreground for the outline only, 1=Fill with foreground 
Fc9-void-icon.png - VOID Return


DrawGraph

Fc9-comp-macro.png DrawGraph
Draws a line graph area on the display with or without grids. Uses the current foreground / background colours 
Fc9-u16-icon.png - UINT X
X coordinate for top left of graph 
Fc9-u16-icon.png - UINT Y
Y coordinate for top left of graph 
Fc9-u16-icon.png - UINT Width
Width of graph in pixels 
Fc9-u16-icon.png - UINT Height
Height of graph in pixels 
Fc9-s16-icon.png - INT MinX
Minimum X Value - XY type only 
Fc9-s16-icon.png - INT MaxX
Minimum X Value - XY type only 
Fc9-s16-icon.png - INT MinY
Minimum Y Value 
Fc9-s16-icon.png - INT MaxY
Maximum Y Value 
Fc9-u8-icon.png - BYTE Type
0=Scrolling, 1=XY 
Fc9-u8-icon.png - BYTE NumPoints
Number of points per line - Scrolling Type Only 
Fc9-u8-icon.png - BYTE ThemeIndex
 
Fc9-u8-icon.png - BYTE XMajor
Major subdivisions count 
Fc9-u8-icon.png - BYTE XMinor
Minor subdivisions count 
Fc9-u8-icon.png - BYTE YMajor
Major subdivisions count 
Fc9-u8-icon.png - BYTE YMinor
Minor subdivisions count 
Fc9-void-icon.png - VOID Return


DrawLine

Fc9-comp-macro.png DrawLine
Draws a single pixel thickness line 
Fc9-u16-icon.png - UINT X1
 
Fc9-u16-icon.png - UINT Y1
 
Fc9-u16-icon.png - UINT X2
 
Fc9-u16-icon.png - UINT Y2
 
Fc9-void-icon.png - VOID Return


DrawPixel

Fc9-comp-macro.png DrawPixel
Draws a single pixel in the foreground colour at X,Y 
Fc9-u16-icon.png - UINT X1
 
Fc9-u16-icon.png - UINT Y1
 
Fc9-void-icon.png - VOID Return


DrawQRCode

Fc9-comp-macro.png DrawQRCode
Draws a QR code with the specified data string embedded. Default size for the QR code is 33 x 33 @ a scaler of 1. Can be used to store up to 78 characters Recommend a scaler of 3 or 4. QR code should be drawn with a decent clear border around it to make it easier to scan.  
Fc9-u16-icon.png - UINT X
Left hand side pixel coordinate 
Fc9-u16-icon.png - UINT Y
Top side pixel coordinate 
Fc9-u8-icon.png - BYTE Scaler
Size of each block in pixels 
Fc9-string-icon.png - STRING Text
Data to embed into the QR code. e.g. "www.flowcode.co.uk/EM" 
Fc9-void-icon.png - VOID Return


DrawRectangle

Fc9-comp-macro.png DrawRectangle
Draws a rectangle from X1,Y1 to X2,Y2  
Fc9-u16-icon.png - UINT X1
 
Fc9-u16-icon.png - UINT Y1
 
Fc9-u16-icon.png - UINT Width
 
Fc9-u16-icon.png - UINT Height
 
Fc9-bool-icon.png - BOOL Transparent
When Solid=0 - 0 = Fill with Background / 1 = No Fill 
Fc9-bool-icon.png - BOOL Solid
0=Foreground for the outline only, 1=Fill with foreground 
Fc9-void-icon.png - VOID Return


DrawRoundedRectangle

Fc9-comp-macro.png DrawRoundedRectangle
Draws a rectangle with rounded corners 
Fc9-u16-icon.png - UINT X1
 
Fc9-u16-icon.png - UINT Y1
 
Fc9-u16-icon.png - UINT Width
 
Fc9-u16-icon.png - UINT Height
 
Fc9-u16-icon.png - UINT Radius
 
Fc9-u8-icon.png - BYTE Transparent
Chooses the transparency of the box - 0 = Box contains background colour, 1 = Box contains previous pixel data. 
Fc9-u8-icon.png - BYTE Solid
Chooses to fill the box with colour - 0 = Box contains transparency data, 1 = Box contains foreground colour. 
Fc9-void-icon.png - VOID Return


DrawString

Fc9-comp-macro.png DrawString
Draws a string at the specified location in the specified font 
Fc9-u16-icon.png - UINT X1
 
Fc9-u16-icon.png - UINT Y1
 
Fc9-string-icon.png - STRING Data
 
Fc9-u8-icon.png - BYTE Font
 
Fc9-bool-icon.png - BOOL Transparent
0=Draw background, 1=Do not draw background 
Fc9-u8-icon.png - BYTE Align
0=Left, 1=Center, 2=Right 
Fc9-void-icon.png - VOID Return


FileCreate

Fc9-comp-macro.png FileCreate
Creates an empty file on the file system  
Fc9-string-icon.png - STRING Filename
Text label to draw on the button 
Fc9-u8-icon.png - BYTE Return


FileDelete

Fc9-comp-macro.png FileDelete
Deletes a file from the file system  
Fc9-string-icon.png - STRING Filename
Text label to draw on the button 
Fc9-u8-icon.png - BYTE Return


FileInit

Fc9-comp-macro.png FileInit
Starts up the FAT file system access function for the SD card 0=OK 
Fc9-u8-icon.png - BYTE Return


FileOpen

Fc9-comp-macro.png FileOpen
Opens a file ready for reading or writing  
Fc9-string-icon.png - STRING Filename
Text label to draw on the button 
Fc9-u8-icon.png - BYTE Return


FileReadArray

Fc9-comp-macro.png FileReadArray
Read an array of bytes from the current open file Returns the number of bytes read from the file 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u16-icon.png - UINT Count
 
Fc9-u16-icon.png - UINT Return


FileWriteArray

Fc9-comp-macro.png FileWriteArray
Write an array of bytes to the current open file 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u16-icon.png - UINT Count
 
Fc9-void-icon.png - VOID Return


FolderOpen

Fc9-comp-macro.png FolderOpen
Navigates the current directory to a folder We can use ",," to go up a level or "root" to go back to the root. 
Fc9-string-icon.png - STRING Filename
Text label to draw on the button 
Fc9-u8-icon.png - BYTE Return


GetAPIVersion

Fc9-comp-macro.png GetAPIVersion
 
Fc9-u16-icon.png - UINT Return


GetCardPresent

Fc9-comp-macro.png GetCardPresent
Checks to see if a SD card is inserted 1=Card Present, 0=No Card Present 
Fc9-bool-icon.png - BOOL Return


GetLastButtonPress

Fc9-comp-macro.png GetLastButtonPress
Gets the button index of the last valid button press. 255 = No new touch detected 
Fc9-u8-icon.png - BYTE Return


GetLastRawTouchCoordinate

Fc9-comp-macro.png GetLastRawTouchCoordinate
Gets the coordinates of the last touch. -1 = no new touch data available. 
Fc9-s16-icon.png - INT XY
 
Fc9-void-icon.png - VOID Return


GetSliderValue

Fc9-comp-macro.png GetSliderValue
Gets the value of one of the slider buttons 
Fc9-u8-icon.png - BYTE ButtonID
the ID of the slider button you want to read 
Fc9-f32-icon.png - FLOAT Return


Initialise

Fc9-comp-macro.png Initialise
 
Fc9-void-icon.png - VOID Return


ListenForTouch

Fc9-comp-macro.png ListenForTouch
Enables a screen touch to interrupt the microcontroller using a UART RX interrupt. The master microcontroller must call this function and then enable UART RX interrupt. 
Fc9-u16-icon.png - UINT State
0=Off, 1=On 
Fc9-bool-icon.png - BOOL ButtonOnly
0=All Touches, 1=Buttons/Sliders only 
Fc9-void-icon.png - VOID Return


SetBackgroundColour

Fc9-comp-macro.png SetBackgroundColour
Sets the background draw colour 
Fc9-u8-icon.png - BYTE R
 
Fc9-u8-icon.png - BYTE G
 
Fc9-u8-icon.png - BYTE B
 
Fc9-void-icon.png - VOID Return


SetBacklightBrightness

Fc9-comp-macro.png SetBacklightBrightness
Sets the brightness of the backlight 
Fc9-u8-icon.png - BYTE Brightness
0=Off, 255=Max 
Fc9-void-icon.png - VOID Return


SetBitmapTransparencyColour

Fc9-comp-macro.png SetBitmapTransparencyColour
Sets the RGB colour to use as a transparent mask when drawing bitmaps 
Fc9-u8-icon.png - BYTE R
 
Fc9-u8-icon.png - BYTE G
 
Fc9-u8-icon.png - BYTE B
 
Fc9-void-icon.png - VOID Return


SetColourPallet

Fc9-comp-macro.png SetColourPallet
Sets the colour pallet for drawing buttons 
Fc9-u8-icon.png - BYTE ThemeIndex
Range: 0 to 9 
Fc9-u8-icon.png - BYTE ForegroundR
 
Fc9-u8-icon.png - BYTE ForegroundG
 
Fc9-u8-icon.png - BYTE ForegroundB
 
Fc9-u8-icon.png - BYTE BackgroundR
 
Fc9-u8-icon.png - BYTE BackgroundG
 
Fc9-u8-icon.png - BYTE BackgroundB
 
Fc9-u8-icon.png - BYTE HighlightR
 
Fc9-u8-icon.png - BYTE HighlightG
 
Fc9-u8-icon.png - BYTE HighlightB
 
Fc9-u8-icon.png - BYTE LowLightR
 
Fc9-u8-icon.png - BYTE LowLightG
 
Fc9-u8-icon.png - BYTE LowLightB
 
Fc9-void-icon.png - VOID Return


SetFontScaler

Fc9-comp-macro.png SetFontScaler
Sets the brightness of the backlight 
Fc9-u8-icon.png - BYTE XScaler
Width Multiplier Range: 1 to x 
Fc9-u8-icon.png - BYTE YScaler
Height Multiplier Range: 1 to x 
Fc9-void-icon.png - VOID Return


SetForegroundColour

Fc9-comp-macro.png SetForegroundColour
Sets the foreground draw colour 
Fc9-u8-icon.png - BYTE R
 
Fc9-u8-icon.png - BYTE G
 
Fc9-u8-icon.png - BYTE B
 
Fc9-void-icon.png - VOID Return


SetGraphData

Fc9-comp-macro.png SetGraphData
Draws a line graph area on the display with or without grids. Uses the current foreground / background colours 
Fc9-u8-icon.png - BYTE TraceIndex
Range: 0-5 Max 6 traces 
Fc9-s16-icon.png - INT X
X value - XY Graph Type Only 
Fc9-s16-icon.png - INT Y
Y value 
Fc9-void-icon.png - VOID Return


SetOrientation

Fc9-comp-macro.png SetOrientation
Sets the display orientation 
Fc9-u8-icon.png - BYTE Orientation
Range: 0 - 3 
Fc9-void-icon.png - VOID Return


SetSliderValue

Fc9-comp-macro.png SetSliderValue
Sets the value of one of the slider buttons 
Fc9-u8-icon.png - BYTE ButtonID
the ID of the slider button you want to read 
Fc9-f32-icon.png - FLOAT Value
Range: 0 to 1 
Fc9-void-icon.png - VOID Return


UpdateButtonText

Fc9-comp-macro.png UpdateButtonText
Redraws the selected button with the new text 
Fc9-u8-icon.png - BYTE ButtonIndex
Range: 0 to NumButtons -1 
Fc9-string-icon.png - STRING Text
 
Fc9-void-icon.png - VOID Return


UpdateButtonTheme

Fc9-comp-macro.png UpdateButtonTheme
Redraws the selected button in a new theme 
Fc9-u8-icon.png - BYTE ButtonIndex
Range: 0 to NumButtons -1 
Fc9-u8-icon.png - BYTE ThemeIndex
Range: 0 to 9 
Fc9-void-icon.png - VOID Return


WifiAcceptClose

Fc9-comp-macro.png WifiAcceptClose
Stops incoming socket requests from being accepted 
Fc9-void-icon.png - VOID Return


WifiAcceptOpen

Fc9-comp-macro.png WifiAcceptOpen
Allows incoming socket requests to be accepted 
Fc9-u8-icon.png - BYTE Return


WifiConnectToSSID

Fc9-comp-macro.png WifiConnectToSSID
Connects to a remote WIFI network 
Fc9-string-icon.png - STRING SSID
Text label to draw on the button 
Fc9-string-icon.png - STRING Password
 
Fc9-u8-icon.png - BYTE Return


WifiCreateAccessPoint

Fc9-comp-macro.png WifiCreateAccessPoint
Creates a local access point 
Fc9-string-icon.png - STRING SSID
Text label to draw on the button 
Fc9-string-icon.png - STRING Password
 
Fc9-u8-icon.png - BYTE Channel
Range 1-14 
Fc9-u8-icon.png - BYTE Encryption
Range 0-4 - 0=Open, 1=WEP, 2=WPAPSK, 2=WPA2PSK 3=WPAWPA2PSK 
Fc9-u8-icon.png - BYTE Return


WifiDisconnect

Fc9-comp-macro.png WifiDisconnect
Disconnect from the current socket 
Fc9-void-icon.png - VOID Return


WifiInit

Fc9-comp-macro.png WifiInit
Startup up WIFI communications  
Fc9-void-icon.png - VOID Return


WifiReadIP

Fc9-comp-macro.png WifiReadIP
Collects the IP address from the WIFI as a string. 
Fc9-string-icon.png - STRING Return


WifiReceiveArray

Fc9-comp-macro.png WifiReceiveArray
Read an array of bytes from the WIFI connection Returns the number of bytes read from the file 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u16-icon.png - UINT Count
 
Fc9-u16-icon.png - UINT Return


WifiScan

Fc9-comp-macro.png WifiScan
Scans the WIFI network and returns the number of networks detected 
Fc9-u8-icon.png - BYTE Return


WifiScanEncryptionMode

Fc9-comp-macro.png WifiScanEncryptionMode
Collects the encryption mode from one of the results of the Scan. 0=Open, 1=WEP, 2=WPA_PSK, 3=WPA2_PSK, 4=WPA_WPA2_PSK 
Fc9-u8-icon.png - BYTE Index
Range: 0 - (Num Returned By WifiSSIDScan) - 1 
Fc9-u8-icon.png - BYTE Return


WifiScanSSID

Fc9-comp-macro.png WifiScanSSID
Collects the SSID network name from one of the results of the Scan. 
Fc9-u8-icon.png - BYTE Index
Range: 0 - (Num Returned By WifiSSIDScan) - 1 
Fc9-string-icon.png - STRING Return


WifiScanSigStrength

Fc9-comp-macro.png WifiScanSigStrength
Collects the signal strength from one of the results of the Scan 
Fc9-u8-icon.png - BYTE Index
Range: 0 - (Num Returned By WifiSSIDScan) - 1 
Fc9-s16-icon.png - INT Return


WifiSendArray

Fc9-comp-macro.png WifiSendArray
Send an array of bytes via WIFI 
Fc9-u8-icon.png - BYTE Data
 
Fc9-u16-icon.png - UINT Count
 
Fc9-void-icon.png - VOID Return


WifiSocketClose

Fc9-comp-macro.png WifiSocketClose
Close a socket 
Fc9-void-icon.png - VOID Return


WifiSocketConnect

Fc9-comp-macro.png WifiSocketConnect
Connect to a remote socket 
Fc9-string-icon.png - STRING Address
 
Fc9-u16-icon.png - UINT Port
 
Fc9-u8-icon.png - BYTE Return


WifiSocketListen

Fc9-comp-macro.png WifiSocketListen
Listens to a socket for incoming data 
Fc9-u16-icon.png - UINT Port
 
Fc9-u8-icon.png - BYTE Return


WifiSocketOpen

Fc9-comp-macro.png WifiSocketOpen
Opens a socket 
Fc9-u8-icon.png - BYTE Return


WifiUninit

Fc9-comp-macro.png WifiUninit
Shots down Wifi communications  
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-16-icon.png TX Remap Pin
 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-16-icon.png RX Remap Pin
 
Fc9-conn-icon.png Simulation
Fc9-type-16-icon.png Simulation Type
 
Fc9-type-16-icon.png COM Port
Lists all the current available COM port hardware on your PC. 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_CapTouchDIsplay.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_CapTouchDIsplay.fcfx