I got my Cyberbrick to work with the app. That was unexpectedly straightforward, which is nice. I am very positively surprised by the product!
With help of the documentation, ChatGPT, and Google I was able to also make it run my own Python scripts. This works when the receiver is connected to my laptop via USB. However, I was not able to make it work when it is not connected. Moreover, using it that way interfered with the regular Cyberbrick app commands I created – only the code I created was active, the things I defined in the app were ignored. Which is not the point, cause at that point I could straight up use an ESP32.
I am aware of the Code feature in the app; I tried pasting my code into it and it works (also without USB cable connected & without interfering with the app commands I created).
However, I would like to directly put .py files onto the Cyberbrick. Is that possible?
Best,
~ Languste
PS: The reason I even want to do this in the first place is that I have a bunch of electronic components from my Elegoo UNO R3 Starter Kit. I want to use them with my Cyberbrick kit; to control them, I want to simply have a folder in my VSCode, rather than countless instances of the Code boxes in the app.
The composition description of the custom project shall meet the following conditions and operate according to the rules below.
A custom project must contain a boot.py file.
The boot.py file must be located in the root directory.
Boot.py files will be executed when the core board is supplied with power. After execution, the program will stop running and reset. Thus, boot.py performs the core function of the custom project.
Whether this is what I am looking for… I am not so sure. The ZIP file stuff seems like it is relevant only if I want to share it online with others? Or am I wrong?
I also found the boot.py file that the screenshot shows, for me it looks similar:
>>> print(open("boot.py").read())
# -*-coding:utf-8-*-
#
# The CyberBrick Codebase License, see the file LICENSE for details.
#
# Copyright (c) 2025 MakerWorld
#
# This file is executed on every boot (including wake-boot from deepsleep)
import bbl_product
import sys
_PRODUCT_NAME = "RC"
_PRODUCT_VERSION = "01.00.01.01"
bbl_product.set_app_name(_PRODUCT_NAME)
bbl_product.set_app_version(_PRODUCT_VERSION)
del bbl_product
del _PRODUCT_NAME
del _PRODUCT_VERSION
sys.path.append('/app')
import rc_main
rc_main.main()
>>>
But how do I go from here? Maybe it helps to give you a concrete example: I have code that allows a regular LED (not one from the Cyberbrick kit) to only be turned on when my Cyberbrick kit button is pressed. Here is the code:
import machine
import rc_module
import time
led = machine.Pin(2, machine.Pin.OUT)
while True:
data = rc_module.rc_slave_data()
if data is not None:
if data[6] == 0:
led.value(1)
else:
led.value(0)
time.sleep_ms(20)
What do I now need to do in order to get this code onto my receiver?
PS: I am not an expert on all this, so there might be stupid mistakes that I am doing. I’m trying my best though
You copy boot.py to the CyberBrick by connecting via USB and using a MicroPython file manager to transfer the file into the device’s root directory. Once copied, reboot the CyberBrick and it will automatically run the new boot.py.
GitHub repository for Bambu Cyberbrick:
And here’s a guide written by another user from the forum:
…
Step 2. If you do not already have a REPL capable MicroPython development environment setup, I suggest you take a look at Arduino Lab for MicroPython, which in my opinon will be easiest to work with.
Step 3. Hook up the receiver side CyberBrick Core to your computer, open Arduino Lab for MicroPython and press Connect. On first start of Arduino lab for MicroPython you are asked to pick a folder where to store the files locally. Provide here the folder, where you extracted or git cloned my espnowdemo repository. You can directly provide the /src/app_espnow subfolder of that repo.
Step 4. Open the Files window (in the top right corner of Arduino Lab for MicroPython). You might want to backup your boot.py from the board. To do this, select boot.py in the left side and then click the button with right arrow icon in the middle of the Arduino Lab for MicroPython to start copying the boot.py file from your CyberBrick core to your computer.
Only now I found time again to sit down with my Cyberbrick :b I followed the instructions of xrk that you posted, and it works like a charm! I can now use the Arduino Lab to edit the code on my Cyberbrick. And when disconnecting and then powering my Cyberbrick off and on again, I can use it and test what I coded! I tried to edit some simple values like the LED color, thus proving that I can freely edit the code on my Cyberbrick now!
I must say that it is quite unfortunate that such a helpful (and pretty fundamental, I would say) source is a 35th comment on some thread, though. I appreciate your guidance!
Some more smalll questions that you might be able to answer:
I am wondering, why is a special software like Arduino Lab necessary to access the files on the Cyberbrick? (Especially considering that Arduino and Cyberbrick have nothing to do with each other per se!?) Is there a way I can directly connect it to my VSCode, for example?
As of now, if I wanna test my new code, I need to do the following: disconnect Arduino Lab, take out the usb cable, turn off receiver and transmitter, turn both back on. And then do the reverse if I want to edit something again. Is there a way around this? Ideally, I would like to leave the usb cable inside my receiver and not always have to cut the physical connection.
The simple answer in a nutshell: The system is supposed to be like Lego: Just turn it on and drive your RC car around. It’s not really meant for you to program anything yourself - not really.
Bambu probably doesn’t have its own development department in that area either.
They just bought an existing system and figured, “Most people use it like Lego…anyway”
Most people who want to dive in that deeply just use an ESP32, Arduino or a Raspberry Pi right away.
As for your other questions: I have no idea - I’m not that familiar with the subject.