Skip to content

Line-us/Scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Line-us TurboWarp Extension

A TurboWarp extension for controlling Line-us drawing robots. This is a port of the original ScratchX extension to work with TurboWarp's modern extension system.

Features

  • Connect to Line-us drawing robots via WebSocket
  • Control pen position (up/down)
  • Move to specific coordinates
  • Set drawing speed
  • Home the robot
  • Send custom G-code commands

Installation

⚠️ Important: Use TurboWarp Desktop for Line-us Connection

Due to browser security restrictions (mixed content policy), the Line-us extension requires TurboWarp Desktop to connect to your Line-us robot.

Method 1: TurboWarp Desktop (Recommended)

  1. Download TurboWarp Desktop
  2. Install and open TurboWarp Desktop
  3. Click the extension button (+)
  4. Choose "Custom Extension"
  5. Load the line-us-extension.js file

Method 2: Web Browser (Limited - No Line-us Connection)

  1. Open TurboWarp
  2. Click the extension button (+)
  3. Choose "Custom Extension"
  4. Load the line-us-extension.js file
  5. ⚠️ Note: Connection will fail due to HTTPS/WebSocket security restrictions

Usage

Setup Your Line-us

  1. Connect your Line-us to WiFi
  2. Note the IP address (check your router or use Line-us app)
  3. Ensure your computer is on the same network

Using the Blocks

The extension provides blocks for:

  • Connect to Line-us [hostname] - Establish connection (use IP address like 192.168.1.100)
  • Pen [up/down] - Control pen position
  • Move to X[x] Y[y] - Move to coordinates (Scratch units: 0,0 = center)
  • Go to home position - Return to home
  • Set drawing speed to [speed] - Control movement speed (Slow/Normal/Fast)
  • Send GCode [command] - Send raw G-code commands

Basic Example Program

When [green flag] clicked
Connect to Line-us [192.168.1.100]
Pen [down]
Move to X[50] Y[50]
Move to X[-50] Y[50]
Move to X[-50] Y[-50]
Move to X[50] Y[-50]
Move to X[50] Y[50]
Pen [up]
Go to home position

Development

This extension is designed for TurboWarp's unsandboxed extension environment to enable WebSocket connectivity.

License

Same as original ScratchX extension.

About

Scratch plugin for Turbowarp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •