Difference between revisions of "Component: Bluetooth ( Comms)"

From Flowcode Help
Jump to navigationJump to search
(Made the filters section more readable)
(Removed incorrect example)
 
(One intermediate revision by one other user not shown)
Line 47: Line 47:
 
==Examples==
 
==Examples==
  
Example takes an inpt from a slider and outputs the number to a seven segment display. The display prints Err if the number is out of range.
+
''<span style="color:red;">No additional examples</span>''
 
 
{{Fcfile|7segtest.fcsx|Web 7 Segment Display Example}}
 
 
 
[https://www.flowcode.co.uk/wiki/WebDevExamples/7segtest.html Web 7 Segment Display Example]
 
  
 
==Macro reference==
 
==Macro reference==
Line 113: Line 109:
 
| width="90%" | Filters
 
| width="90%" | Filters
 
|-
 
|-
| colspan="2" | Limits the list of available Bluetooth devices, for example:
+
| colspan="2" | Limits the list of available Bluetooth devices, for example:     filters: [ { services: [0x1802, 0x1803] } ]     filters: [ { name: "My Cool Device" } ]     filters: [ { namePrefix: "Mtx" } ]     filters: [ { services: ["heart_rate"] } ],     optionalServices: ["battery_service"] (leave blank for all devices) &nbsp;
* filters: [ { services: [0x1802, 0x1803] } ]
 
* filters: [ { name: "My Cool Device" } ]
 
* filters: [ { namePrefix: "Mtx" } ]
 
* filters: [ { services: ["heart_rate"] } ], optionalServices: ["battery_service"]
 
* (leave blank for all devices) &nbsp;
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-24-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-24-icon.png]]

Latest revision as of 10:27, 27 April 2026

Author MatrixTSL
Version 0.1
Category Comms


Bluetooth component

Allows connection to a bluetooth device from the browser.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

Disconnect

Fc9-comp-macro.png Disconnect
Disconnects from the remote BLE device 
Fc9-void-icon.png - VOID Return


RequestDevice

Fc9-comp-macro.png RequestDevice
Attempts to connect with a Bluetooth BLE device. 
Fc9-string-icon.png - STRING Return


WriteString

Fc9-comp-macro.png WriteString
Writes a string value to GATT Characteristic on a connected BLE device 
Fc9-string-icon.png - STRING sText
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-11-icon.png Filters
Limits the list of available Bluetooth devices, for example: filters: [ { services: [0x1802, 0x1803] } ] filters: [ { name: "My Cool Device" } ] filters: [ { namePrefix: "Mtx" } ] filters: [ { services: ["heart_rate"] } ], optionalServices: ["battery_service"] (leave blank for all devices)  
Fc9-type-24-icon.png OnDisconnect
Called when the Bluetooth device is disconnected 
Fc9-type-24-icon.png OnValueChanged
Called when the Bluetooth characteristic value changes 
Fc9-type-10-icon.png Service
The Primary Service of the Bluetooth GATT Server 
Fc9-type-10-icon.png Characteristic
The Bluetooth GATT Characteristic 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_WEBEXP_Bluetooth.fcweb

Please click here to view the component source code (Beta): FC_Comp_Source_WEBEXP_Bluetooth.fcweb