Your first CupCarbon project: one IoT node that blinks and displays “Hello” and “World!”
Player not loading? Watch the tutorial directly on YouTube.
Prefer reading? Every step is written below — the video simply follows the same order.
You need CupCarbon Klaines 8.0 installed (installation guide)
and Python 3 available on your machine — IoT nodes run real Python scripts.
Check it in a terminal with python3 -V.
python3.tutorial1, then validate.CupCarbon creates a folder containing everything about your scenario:
config/ (the nodes), scripts/ (the programs), gps/
(the routes), results/, agents/ (the AI workflows)... The title bar
now shows the project name.
The two circles around the node are its radio range and its sensing range. Its center is gray: no program is assigned yet.
Open the Program editor from the toolbar and type:
from cup_functions import *
while True:
cup_mark()
cup_print('Hello')
cup_wait(1)
cup_unmark()
cup_print('World!')
cup_wait(1)
Type hello_world.py in the File name field and click Save. The file
is created in the scripts/ folder of your project and appears in the script list.
cup_* function on the right — double-click one to insert it, and click
Help for its description and three examples. If you saved without an extension,
CupCarbon adds .py automatically.hello_world.py.The center of the node turns orange: it now has a program.
Click Run Simulation (toolbar or left panel). The node starts its Python script:
A red frame around the map and the simulated time in the top-left corner indicate that the simulation is running.
Click Stop Simulation, then save your project (Project → Save or the save icon). Your scenario — the node, its program and its position — is stored in the project folder and can be reopened, zipped or shared as is.
from cup_functions import * — always the first line. It gives you
auto-completion while editing; when the simulation starts, CupCarbon injects the real
implementations of the functions.while True: — the node repeats its behavior forever (until you stop the
simulation).cup_mark() / cup_unmark() — highlight the node on the map, like
switching a LED on and off.cup_print('Hello') — displays a message next to the node.cup_wait(1) — waits one second of simulated time. Always keep a
cup_wait in a loop.There are 30 cup_* functions: movement, GPS routes, sensing, node-to-node
messaging, and the bridge to the agentic AI workflows. The complete list is in the
help and in the
user guide.
python3.cup_wait().Now that your first node lives, try: two nodes exchanging messages
(cup_send / cup_read), a mobile node following a GPS route, or an
AI agent driving your network from the Agentic AI workflows.