IoT

OneNET

 

🧩 Fun Guide to OneNET Blocks (Clu-blocks Pro)

☁️ Important! OneNET blocks let your robot connect to the cloud, send sensor data, and receive commands from anywhere. It’s like giving your robot a walkie-talkie to talk to the internet!

#BlockWhat it doesDropdown optionsWhat the options mean
1Connect Wi-Fi name "wifiname" password "wifipassword"Connects your robot to Wi-FiYou enter your network name and password — just like logging in at home
2OneNETConnectSets up connection to OneNETYou enter Device ID, Server, Product ID, APIKey, Device Name, and a callback function
3sub_cb with topic, msg do msg = msgHandles messages from OneNETThis function runs when your robot receives a message — like “turn on” or “change color”
4Send information to OneNET Key: key1 Value: msgSends a single value to OneNETYou choose a key name and the value to send — great for sensor readings
5iot_dict initialize dictionary as {"tc": get Touch Sensor A0 value}Creates a data dictionaryYou can group multiple sensor values into one package to send
6Send information to OneNET Data: iot_dictSends a full dictionary to OneNETSends all the grouped data at once — like a full status report
7OneNET executeStarts the OneNET processNeeded to keep the connection alive and working — like pressing “start”
8Receive and execute OneNET commandsListens for commands from the cloudYour robot waits for instructions — like “move forward” or “turn off”

🧠 Quick Tips for Students

  • Always connect to Wi-Fi first — no internet, no cloud!
  • Use OneNETConnect to log in to the platform — like signing into your robot’s online account.
  • Use keys and dictionaries to send sensor data — you can send one value or a whole bundle.
  • Use callback functions to react to messages — like “if message is 1, turn on LED”.
  • Use execute and receive to keep your robot synced with the cloud — like a live chat.
On this page