Complete installation instructions are available at:
To send commands from Python to CupCarbon:
print("CupCarbon command", flush=True)
def cup(com):
print(com, flush=True)
Print any message on the executing device:
cup("print Hello World!")
Mark or unmark the executing device:
cup("mark")
cup("unmark")
Move the executing device to a GPS location:
cup("move 50.002 21.344")
Get device information:
# Get device ID
cup("getid")
id = input()
# Get device name
cup("getname")
name = input()
# Get device location
cup("getxy")
location = input()
# Get X coordinate
cup("getx")
x = input()
# Get Y coordinate
cup("gety")
y = input()
import time
def cup(com):
print(com, flush=True)
while True:
cup("print Hello ")
time.sleep(1)
cup("print World!")
time.sleep(1)
Install MQTT for Python:
pip install paho-mqtt
or
pip3 install paho-mqtt
Useful MQTT Resources:
🎉 Now you can use CupCarbon, enjoy!