Communicate

Bluetooth Transmission

 

🧩 Fun Guide to Bluetooth Transmission Blocks (Clu-blocks Pro)

📶 Important! Bluetooth blocks let your robot talk to other devices — like phones, tablets, or other robots. You can send messages, receive commands, and even check if the connection worked. It’s like giving your robot a walkie-talkie!

# Block What it does Dropdown options What the options mean
1 Bluetooth ble_c Init as Central Device (Host) Sets up your robot as the controller Central devices scan and connect to others — like the boss of the Bluetooth network
2 Bluetooth ble_p Init as Peripheral Device (Slave) name "Clu-Bots" Sets up your robot as a responder Peripheral devices wait to be connected — like a helper robot
3 ble_c Scan Bluetooth Starts searching for nearby devices Finds Bluetooth devices around you — like radar
4 ble_c joinBluetooth name "Clu-Bots" Connects to a device by name name, MAC Address name: connect using device name
MAC Address: connect using unique hardware ID
5 ble_c OneNET disconnected Disconnects from OneNET via Bluetooth Stops the Bluetooth link to the cloud — useful for switching modes
6 ble_x Get local MAC address Gets your robot’s Bluetooth ID Useful for identifying your robot or sharing its address
7 ble_x Whether the connection is successful Checks if Bluetooth is connected Returns true or false — great for debugging or triggering actions
8 ble_x Bluetooth send data body "Clu-Bots" Sends a message over Bluetooth You can send text, numbers, or commands to another device
9 Receive message do callback function ble_method Runs a function when a message is received Like saying “when I get a message, do this” — perfect for remote control or chat
10 ble_method with: data Defines what to do with received data You can check the message and decide how to respond
11 if data = "Clu-Bots" Checks if the message matches something Great for filtering messages — like “if I hear ‘Clu-Bots’, turn on LED”

🧠 Quick Tips for Students

  • Use Central mode to control other devices — like a remote.
  • Use Peripheral mode to be controlled — like a robot waiting for orders.
  • Use send + receive to build chat systems, remote controls, or multiplayer games.
  • Always check connection status before sending — it saves bugs and frustration.
  • Use callback functions to make your robot react instantly — like a Bluetooth reflex!
On this page