📡

Connect Arduino & IoT Devices with Bluetooth

Connect hardware devices

7 min read
← Back to Blog
BluetoothArduinoIoTHardwareTutorial

Build IoT Apps Without Code

Codular supports full Bluetooth connectivity - connect to Arduino boards, sensors, printers, and any BLE device.

3 Bluetooth Components

ComponentRoleUse Case
Bluetooth AdminCheck status, enable/disableToggle BT on first launch
Bluetooth ClientConnect TO devicesArduino, sensor, printer
Bluetooth ServerAccept connections FROM devicesYour phone as a hub

Connecting to Arduino

Step 1: Setup Arduino

Upload a sketch that sends/receives serial data over Bluetooth (HC-05/HC-06 module).

Step 2: Add Components

  • Drag BluetoothAdmin onto screen (to check/enable BT)
  • Drag BluetoothClient onto screen
  • Set Service UUID (default works for most serial modules)
  • Drag Arduino component for serial communication
  • Set Baud Rate to match your Arduino (usually 9600)

Step 3: Create Flows

  • Scan: Event → Start Bluetooth Scan → save devices to variable
  • Connect: Event (device selected) → Connect Bluetooth (deviceId)
  • Send: Event (button press) → Send Bluetooth Data ("LED_ON")
  • Receive: BluetoothClient.onDataReceived → Set Variable (sensorData)

Thermal Printer via Bluetooth

  • Drag ThermalPrinter component
  • Set connection = Bluetooth, paper width = 58mm
  • Flow: Connect Thermal Printer → Print Receipt (text) → Print Barcode (QR) → Cut Paper

Tips

  • Always check Bluetooth is enabled before scanning
  • Handle disconnection gracefully
  • Use the Arduino component's delimiter (\n) to split messages
  • Test with HC-05 module first - most compatible

Start building at mobcraft.in.

C
Codular Team
Building the future of no-code app development

Build Your App Now

No coding required. AI-powered. Free to start.

Get Started Free