HW bridge for Arduino Colab
Project description
Arduino Colab Project
Arduino Bridge
This is HW<->frontend bridge component of Arduino Colab Project.
How to Use
1. Running the Remote Server
To use the remote backend (for cloud or remote Jupyter/Colab environments), you need to run the remote server on the machine connected to your Arduino hardware.
Install dependencies:
pip install -r .\requirements.txt
Run the server: RUN server with default settings (localhost):
python -m arduino_colab_kernel.backends.remote_server
OR use custom port and token:
python -m arduino_colab_kernel.backends.remote_server --port 5000 --token YOUR_TOKEN
- Replace
YOUR_TOKENwith a secure token of your choice. - The server will listen for requests from the frontend (Colab/Jupyter).
1.1 Open server site in web-browser
Open server URL address in web-browser and copy TOKEN, and Server URL if needed.
2. Connecting from the Client (Colab/Jupyter)
In your Jupyter/Colab notebook, load the magics and set up the remote backend:
%load_ext arduino_colab_kernel.magic_project
%load_ext arduino_colab_kernel.magic_board
%load_ext arduino_colab_kernel.magic_code
%load_ext arduino_colab_kernel.magic_serial
MY_API_TOKEN = input("Enter your API token: ") # Use the same token as the server
REMOTE_URL = "http://<server-ip>:<server-port>" # Replace <server-ip> and <server-port> with your server's IP address and port (*Optional*)
# Load or initialize a project in remote mode
%project load --mode remote --remote_url $REMOTE_URL --token $MY_API_TOKEN
# init
%project init --mode remote --remote_url $REMOTE_URL --token $MY_API_TOKEN
# or use simplify version with default server address:
%project load --mode remote --token {MY_API_TOKEN}
# init
%project init --mode remote --token {MY_API_TOKEN}
3. Workflow
- Use
%project,%board,%%code, and%serialmagics as usual. - All compile/upload/serial operations will be forwarded to the remote server.
Example
# Set up remote backend
MY_API_TOKEN = "YOUR_TOKEN"
REMOTE_URL = "http://192.168.1.100:5000"
%project init my_project --mode remote --remote_url $REMOTE_URL --token $MY_API_TOKEN
%board select uno
%%code setup
pinMode(13, OUTPUT);
%%code loop
digitalWrite(13, HIGH); delay(500); digitalWrite(13, LOW); delay(500);
%board upload
%serial listen --duration 10
Security
- Always use a strong, secret token for authentication.
- Never expose your remote server to the public internet without proper security.
For more details, see project Arduino Colab on Github
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arduino_colab_bridge-0.1.0.tar.gz.
File metadata
- Download URL: arduino_colab_bridge-0.1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd633a5463c458f850ca8132e6103914f4e1b130cd6363aae668fe19f8ebd079
|
|
| MD5 |
9a8529ffb54c7be5d852f6e0c8357713
|
|
| BLAKE2b-256 |
b14996220c9dd69ddcdd94f84c756fe3cce22f421792888b58152f61ba9037aa
|
File details
Details for the file arduino_colab_bridge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: arduino_colab_bridge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cad0b1f371989099dcc7d56d7bf3c7a4ba372496f3eadae22a4cf3aa9ff01b38
|
|
| MD5 |
5c209a890a5d8e642cea6978dfed2402
|
|
| BLAKE2b-256 |
caec520a31afa552b4e49d52569d71d1f408ce8039bcf170fec14e30821c2097
|