News

Guides have moved

The pictoral guides for assembling and using Marginally Clever robots are at this new link: https://www.marginallyclever.com/guides/.

If you’re into robot arms, try reading the Sixi 2 and 3 guides. They were super fun to design and I learned a lot, but they are like the eggs that must be broken to make the omelette. Sixi 3 is many times simpler because it’s just one part that repeats 5-6 times.

Anyways… It’s all possible because of your support. Robotics is not a cheap hobby and your generosity has enabled me to keep making. Thank you! Stay awesome!

News

Extra Life D&D for Kids

I am signed up to play in The 13th Annual Extra Life 24-hour Dungeons & Dragons Game For Charity, which benefits the BC Children’s Hospital. This year’s game will be held on October 17th, starting at midnight. If you can spare a dollar in this economy, it would be a kindness. Click here: https://dd.extra-life.org/participants/581203

News

Factorio self-loading construction train

Factorio is my favorite build-a-base game and the Pyanadons + Alien Life mod is my latest obsession. Huge bases are a logistics challenge, and I like to move fast. A common feature of my factories is a mall where machines build the equipment to expand the rest of the factory. Logistics drones carry things between the mall providers to make sophisticated, low-quantity equipment.

360h into Pyanadons

When a new sub-factory plan is ready, the parts need to be brought to the construction site. In an efficient factory the trip is done once. As the factory grows, so does the travel time to areas where new construction can take place.

over 60s to cross on the fastest train

Solution 1: Drones everywhere

One potential solution is to extend the logistic drone service area to the entire factory. When a new sub-factory has many thousands of parts that sends many hundreds of robots on long slow journeys carrying a few parts each. It will eventually get done….

A second problem with that method is that all-factory logistic zone will break any localized logistics setups. Sometimes it’s easier to have a local dedicated logistics zone instead of a mess of belts. The belts store a lot of valuable parts in an expensive buffer and the belt spaghetti could get really ugly.

This train station received nine different expensive products and there’s only comfortably room for 4 belts (8 products). Drones delivering from the station to A and from A to B makes life easy – provided the drones stay in their lane and don’t fly off to service every other logistic request in the factory. You gotta keep ’em separated.

Solution 2: Construction train

A better way is to bring everything on a train. Even a slow moving train is faster than hundreds of bots. Did you know in 2025 it’s still faster to move a truck full of hard drives than to transmit the same amount of data over the internet?

But I also don’t want to hunt-and-peck across the mall for every part in my blueprint. I need a way to tell my logisitics drones to fill a train for me.

This train is large enough to store equipment for even my largest builds (to date). The contents of the right-side belt, the blue inserters, the train train car, and the blue requester chest… are all on a green wire. More on that in a second.

A is a constant combinator into which I’ve dropped my latest blueprint. It has a red wire that connects to B, an arithmetic combinator.

B says red wire = red (what we want) - green (what we have) and sends that to C, the requester chest. As drones deliver the request become smaller and smaller.

D unloads the requester chest onto the belt so parts can be loaded onto the train. Left to its own devices it would spit out parts at random and then each car might not be efficiently packed. Since D has five filter slots, I use five selector combinators (E) to choose the five most plentiful items in the box. This typically results in all the belt first, then the pipes, then the rail, and so on. That also means the front of the train is packed with the most plentiful items.

Finally, F waits to see “is there a train” and “is there a demand set” and “is the demand met”? and if all those conditions are true then it sends signal A, which the train can use to depart the station. It will automatically go to the next station when it is ready, which is handy when I stay at a distant place and send the train home to fetch me things.

Final thoughts

To drop a blueprint onto a combinator, open the combinator and drop the blueprint on the “add section” button. (thanks, Jules!)

Here is the blueprint to drop into your base.

I love building large systems and Factorio’s Pyanadons mod is no exception. It has clearly had an effect on the node-based no-code system I’ve been building.

Here’s an earlier version of my sushi-belt mall, prior to logistics drones.

Here’s the same base all the way back at 67h, shortly after I unlocked trains.

News

Things Marginally Clever won’t do

We will never collaborate on sponsored posts.

We have no intention of inviting guests to post.

We are not interested in your rates for improving our social media reach.

If you represent one of these groups, please get help.

News Tutorials

Friday Facts 21: Python to Makelangelo

Makelangelo a great way to tinker with algorithmic art, procedural art, generative code, and more. Python is a popular language for building generative art. To send G-code to a Makelangelo plotter over a serial connection using Python, you can use the pyserial library. Here is an example script that demonstrates how to establish the connection and send G-code commands.

First make sure you have pyserial installed.

pip install pyserial

Then, open a serial connection to a USB connected Makelangelo.

import serial
import time

def send_gcode(port, baudrate, commands):
    try:
        # Open the serial port
        with serial.Serial(port, baudrate, timeout=1) as ser:
            time.sleep(2)  # Wait for the connection to establish

            # Send each G-code command
            for command in commands:
                ser.write((command + '\n').encode('utf-8'))
                time.sleep(0.1)  # Short delay between commands
                response = ser.readline().decode('utf-8').strip()
                print(f"Response: {response}")

    except serial.SerialException as e:
        print(f"Serial error: {e}")

# Define the G-code commands to send
gcode_commands = [
    "G28",  # Home all axes
    "G1 X10 Y10 Z0 F3000",  # Move to (10, 10, 0) at 3000 mm/min
    "G1 X20 Y20 Z0 F3000",  # Move to (20, 20, 0) at 3000 mm/min
    # Add more G-code commands as needed
]

# Send G-code commands to Makelangelo plotter
send_gcode('/dev/TTY0', 250000, gcode_commands)

Explanation

  1. Import serial and time: Import necessary modules for serial communication and timing.
  2. Define send_gcode function: This function takes the serial port, baudrate, and a list of G-code commands as arguments. It opens the serial port, sends the G-code commands one by one, and prints the responses from the plotter.
  3. Open the serial port: Using a with statement to ensure the port is properly closed after use.
  4. Send commands: Iterate through the list of G-code commands, send each command, and print the response from the plotter.
  5. Define G-code commands: A list of G-code commands to be sent to the plotter.
  6. Call send_gcode: Pass the serial port, baudrate, and G-code commands to the function.

Ensure that the port (/dev/TTY0) and baudrate (250000) match your Makelangelo plotter’s configuration. Adjust the G-code commands as needed for your specific tasks.

Final thoughts

You might also be interested in related plotter projects like vpype and vsketch.