#IT'S CUTE

1 messages ยท Page 1 of 1 (latest)

violet pebble
#

abit overkill but survival ready
powerd by campfire and coal
hand crank start
auto coal feeder
computer drive

sharp crow
#

@static lark

static lark
violet pebble
#

dressed it up @here

static lark
sharp crow
violet pebble
static lark
violet pebble
#

i'll do it tmr im not done yet

#

im still adding shit as u can see

#

also you won't beable to drive it without a web server

#

maybe i'll do the guide and share the control code too for those who can set it up

full scaffold
static lark
#

No schem though

#

So the post is faked

violet pebble
#

STEP 0: MODS REQUIRED
Computer craft
VS and Clockwork
#about-eureka (*use for placing the craft into the world)
#about-trackwork
#about-cc-vs
#1201250013196591294 (**optional for faster update time)
STEP 1: FIX WATER

#

STEP 2: FIX TRACKS replace suspension peices if required set the force to 4.0 on all tracks

#

STEP 3: COMPUTER

pastebin get rN12ahEr startup
startup
#

STEP 4: Python

import asyncio
import threading
import websockets
from inputs import get_gamepad

###setup###

port = 8000
update_delay = 0.2 # Create Tweeked needed for faster update time (0.01) instead of (0.2)
value = "000000000000"

###end of setup###

def map_value(input):
    value = (input * abs(input)) / 32000
    normal = int((value - (-32000)) * (15 - (-15)) / (32000 - (-32000)) + (-15))
    
    r = 1
    if normal < 0:
        r = 0
    normal = str(abs(normal)).zfill(2)
    return str(r) + str(normal)

async def send_value(websocket, path):
    global value
    while True:
        await websocket.send(value)
        await asyncio.sleep(update_delay)

async def ws_server():
    async with websockets.serve(send_value, "localhost", port):
        print("WebSocket server started on ws://localhost:" + port)
        await asyncio.Future()  # Run forever

def input_processing():
    global value
    valuearray= ["000", "000", "000", "000"]
    while True:
        events = get_gamepad()
        for event in events:
            if event.ev_type == 'Absolute':
                if event.code == 'ABS_X':
                    valuearray[0] = map_value(event.state)
                elif event.code == 'ABS_Y':
                    valuearray[1] = map_value(event.state)
                elif event.code == 'ABS_RX':
                    valuearray[2] = map_value(event.state)
                elif event.code == 'ABS_RY':
                    valuearray[3] = map_value(event.state)
                value = "".join(valuearray)

# Create threads for the WebSocket server and input processing
ws_thread = threading.Thread(target=lambda: asyncio.run(ws_server()))
input_thread = threading.Thread(target=input_processing)

# Start both threads
ws_thread.start()
input_thread.start()

# Wait for both threads to finish
ws_thread.join()
input_thread.join()
violet pebble
#

@here

rigid wave