Repository navigation
Turntable Quick start
Lycoris edited this page Nov 10, 2026
·
1 revision
Put a computer next to the bearing, then run this. It assembles the plate if needed, turns it a quarter turn and waits for the turn to finish. The plate needs rotation reaching the bearing, or it does not move.
local turntable = peripheral.find("loconautics:turntable_bearing")
if not turntable then error("no turntable bearing attached") end
if not turntable.isAssembled() then turntable.assemble() end
turntable.turnBy(90)
repeat os.sleep(0.05) until not turntable.isTurning()
print(turntable.getAngle())| I want to | Go to |
|---|---|
| Get the turntable to talk to | Getting a handle |
| Know how angles, speed and errors work | Conventions |
| Build or release the plate | Assembly |
| Turn the plate to an angle | Rotation |
| Change the turn speed or read the stress | Kinetics |
| Run a repeating pattern without the computer | Sequences, Redstone |
| Let scheduled trains use the plate | Schedule mode |
| Find the plate or its axis in the world | Geometry |
| Read everything in one call | State snapshot |
| Copy a working program | Examples |
| Call | Turns | Direction |
|---|---|---|
turnBy(degrees) |
By that amount from now, not wrapped | The sign of the number |
turnTo(degrees) |
To an absolute angle | The shortest way |
| Sequence | A saved list of turns and waits | Follows the cogwheel, or the override's sign |
Start here
Reading the train
- Identity
- Motion
- State
- Station
- Signals
- Track ahead
- Orientation
- World position
- Carriages
- Consist wide cargo
Driving the train
Schedules
Doors and body
Links
The whole railway
Reacting to changes
Programs and reference
Start here
Controlling the plate
Automatic modes
Reading the turntable
Reference