Complete Guide for Installation and Usage โ Agentic Digital Twin IoT Designer
Download CupCarbon KlainesInstall Java 17+ and Python 3, download the CupCarbon Klaines package of your
platform, unzip and double-click its launcher (cupcarbon_win.bat,
cupcarbon_macm.command / cupcarbon_macx.command, or
cupcarbon_linux.sh).
Complete installation instructions: View Installation Guide
IoT nodes are programmed in Python with the predefined cup_* functions. Start your script with the import line (it gives you auto-completion in any IDE; CupCarbon replaces it with the real implementations when the simulation starts):
from cup_functions import *
Display any message next to the executing node:
cup_print('Hello World!')
cup_print('Temperature:', 25.4, 'C')
cup_mark() cup_unmark()
Move the executing node to a GPS location (longitude, latitude):
cup_move(50.002, 21.344)
Read functions return typed values directly โ no more input():
node_id = cup_getid() # int name = cup_getname() # str x, y = cup_getxy() # floats (longitude, latitude) x = cup_getx() y = cup_gety() marked = cup_ismarked() # bool detect = cup_dsensor() # bool
cup_send('hello') # broadcast to the radio neighbors
cup_send('data', 3) # send to node 3
msg = cup_read() # blocking receive
def cup(com): print(com, flush=True) then cup("mark") and
input()) still works โ the cup_* functions are a cleaner layer on the very
same protocol. Full list with per-function help and 3 examples each: press the
Help button in CupCarbon's Program editor, or see the
function table.
from cup_functions import *
while True:
cup_print('Hello ')
cup_mark()
cup_wait(1)
cup_print('World!')
cup_unmark()
cup_wait(1)
Assign this script to an IoT node (Program editor โ Save, then set it on the node), and click โถ Run IoT Simulation. The editor highlights Python syntax, converts tabs to spaces automatically, and its side panel inserts any cup_* function with a double-click.
Two functions connect your node scripts to the visual AI workflows (๐ค toolbar button):
from cup_functions import *
while True:
cup_toagent('temperature 42', 32) # fires CupCarbon Read triggers (cupid 32)
answer = cup_fromagent(32) # waits for a CupCarbon Send node (cupid 32)
cup_print(answer)
cup_wait(2)
Build the workflow side visually: CupCarbon Read โ AI Agent (Claude/OpenAI) โ CupCarbon Send, and your simulated node now asks an LLM what to do. Chatbots, MQTT pipelines and more on the Agentic AI page.
add iot 25.3020 55.4855, sim iot start...) โ
full list in the Command Reference.The topics are random per session, so only someone with your topic can drive your simulator.
For custom Python MQTT clients inside your node scripts:
pip install paho-mqtt # or: pip3 install paho-mqtt
๐ Now you can use CupCarbon, enjoy!