Is the new Raspberry Pi AI Kit better than Google Coral?
138495 Views
Build Your Own AI Assistant Part 1 - Creating the Assistant
122239 Views
Control Arduino with Python using Firmata / PyFirmata
89178 Views
How to Map with LiDAR - using a Raspberry Pi Zero 2W, RPLidar and Rviz
66846 Views
Creating a Supercomputer with a Raspberry Pi 5 Cluster and Docker Swarm!
61817 Views
Node-Red Automation, MQTT, NodeMCU & MicroPython
54241 Views
SMARS Q
Creating Gears in Fusion 360
UGREEN DXP 4800 Plus NAS Review
How Serial Servos Work (and Why They’re Awesome for Robotics)
How to Keep your Raspberry Pi happy
How to Install Pi-Apps on a Raspberry Pi
DuckDB - Fast, free analytics
1h 36m
Obsidian
1h 0m
Getting Started with C on the Raspberry Pi Pico
0h 50m
Running K3s on Raspberry Pi
1h 28m
From Docker to Podman
1h 2m
MicroPython Robotics Projects with the Raspberry Pi Pico
0h 54m
Learn how to Program in Python, C, Rust, and more.
Learn Linux from the basics to advanced topics.
Learn how to use a Raspberry Pi Pico
Learn MicroPython the best language for MicroControllers
Learn Docker, the leading containerization platform. Docker is used to build, ship, and run applications in a consistent and reliable manner, making it a popular choice for DevOps and cloud-native development.
Learn how to build SMARS robots, starting with the 3D Printing the model, Designing SMARS and Programming SMARS
Learn Python, the most popular programming language in the world. Python is used in many different areas, including Web Development, Data Science, Machine Learning, Robotics and more.
Learn how to build robots, starting with the basics, then move on to learning Python and MicroPython for microcontrollers, finally learn how to make things with Fusion 360.
Learn how to create robots in 3D, using Fusion 360 and FreeCAD. The models can be printed out using a 3d printer and then assembled into a physical robot.
Learn how to create Databases in Python, with SQLite3 and Redis.
KevsRobots Learning Platform
60% Percent Complete
By Kevin McAleer, 3 Minutes
In this lesson, we will learn how to code the BrachioGraph plotter using Python.
Type the following code into the Python command line (also known as the Read Execute Print Loop or REPL) to import the BrachioGraph library:
from brachiograph import BrachioGraph bg = BrachioGraph() # This will create a new BrachioGraph object
You can now use the bg object to control the BrachioGraph plotter.
bg
When the BrachioGraph object is created, the arm will move to the default position.
Now that the servo motor has been set to its default position by the code we have just run, we can attach the inner arm to the shoulder servo.
The servo might not attach at exactly 90 degrees, but that’s okay. The calibration code will take care of that, later.
Test the arm by running the following code:
bg.set_angles(0, 90)
This will move the arm to the 0, 90 position; the shoulder servo will move to 0 degrees and the elbow servo will move to 90 degrees. Note that the arm will move their very quickly, without any motion easing.
To park the arm, run the following code:
bg.park()
This will move the arm to the park position, which is the default position.
Now that the inner arm is attached to the shoulder servo, we can attach the outer arm to the elbow servo.
You can also add the pen (or pencil) to the clothes peg at the end of the outer arm. The tip of the pen should not be touching the paper.
Let’s test the arm by running the following code:
bg.set_angles(-90, 120)
This will move the arm to the -90, 120 position; the shoulder servo will move to -90 degrees and the elbow servo will move to 120 degrees.
To lower the pen to the writing position, run the following code:
bg.pen.down()
The pen should now be touching the paper, if its not, adjust the positon of the pen accordingly.
To raise the pen, run the following code:
bg.pen.up()
You can check the status of the BrachioGraph by running the following code:
bg.status()
The BrachioGraph will report its status:
------------------------------------------ | Servo 1 | Servo 2 | Shoulder| Elbow ----------------------|---------|--------- pulse-width | 1500 | 1500 angle | -90 | 90 hysteresis correction | 0.0 | 0.0 ------------------------------------------ ------------------------------------------ pen: up ------------------------------------------ bottom left: (-8, 4) top right: (6, 13) ------------------------------------------
< Previous Next >
You can use the arrows ← → on your keyboard to navigate between lessons.
← →