UziScript

1 program Added 2026-03-12T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: Uzi, PhysicalBits
Provenance: commit 8ff01a93b1 · authored 2026-03-12T01:23:53+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Urbiscript (0.25)Urbi (0.21)TypeScript (0.21)TiScript (0.20)URScript (0.20)

LLM-contributed programs

Line Follower Robot

Provenance: commit 8ff01a93b1 · authored 2026-03-12T01:23:53+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.uzi · license: MIT · added: 2026-03-12T10:00:00Z
import leftMotor = 'L293.uzi';
import rightMotor = 'L293.uzi';

var sensor = A1;
var buzzer = D6;

var victims;

task setup() once {
	"Configure motors (pins are configured 
	automatically)"
	leftMotor.init(D9, D8, D7);
	rightMotor.init(D10, D11, D12);
}

task followLine() running {
	"Wait until black while moving right"
	until (isOnBlack()) { moveRight(); }
	"Wait until white, still moving right"
	until (isOnWhite()) { moveRight(); }
	"Wait until black while moving left"
	until (isOnBlack()) { moveLeft(); }
	"Wait until white, still moving left"
	until (isOnWhite()) { moveLeft(); }
}

task detectVictims() running {
	if (isOnVictim()) {
		"Stop following the line"
		pause followLine;
		leftMotor.brake(); rightMotor.brake();
		"Increment victim counter"
		victims = victims + 1;
		"Play alarm"
		repeat (victims) {
			turnOn(buzzer); delay(500);
			turnOff(buzzer); delay(500);
		}
		"Resume following the line"
		resume followLine;
		"Wait 100 ms before detecting next victim"
		delay(100);
	}
}

func isOnBlack() { return read(sensor) < 0.2; }
func isOnWhite() { return read(sensor) > 0.5; }
func isOnVictim() { return !isOnBlack() && !isOnWhite(); }

proc moveRight() {
	leftMotor.forward(1);
	rightMotor.forward(0.5);	
}

proc moveLeft() {
	leftMotor.forward(0.5);
	rightMotor.forward(1);
}

Contribute — propose a file extension

Tell us where to find evidence about UziScript (mapped to pl/uziscript). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/UziScript/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Uyjhmn n Uzumaki →