Meta Description" name="description" />

Share this result

Previews are deleted daily. Get a permanent share link sent to your inbox:
Script
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Quadcopter Orientation (STM32)</title> <style> body { margin: 0; } canvas { display: block; } #controls { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,0.8); padding: 10px; border-radius: 5px; } </style> </head> <body> <div id="controls"> <button onclick="connectSerial()">Connect STM32</button> </div> <script src="https://cdn.jsdelivr.net/npm/three@0.152.2/build/three.min.js"></script> <script> // Sahne, kamera ve renderer const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); // Drone modeli (kutu) const geometry = new THREE.BoxGeometry(2, 0.5, 2); const material = new THREE.MeshBasicMaterial({color: 0x00ff00, wireframe: true}); const drone = new THREE.Mesh(geometry, material); scene.add(drone); camera.position.z = 5; function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate(); // Seri port bağlantısı let port; async function connectSerial() { try { port = await navigator.serial.requestPort(); await port.open({ baudRate: 115200 }); const reader = port.readable.getReader(); const decoder = new TextDecoder(); while (true) { const { value, done } = await reader.read(); if (done) break; if (value) { const text = decoder.decode(value); parseData(text); } } } catch (err) { console.error("Serial connection error:", err); } } // STM32’den gelen veriyi çözümleme function parseData(data) { const match = data.match(/ROLL:(-?\d+\.?\d*),PITCH:(-?\d+\.?\d*),YAW:(-?\d+\.?\d*)/); if (match) { const roll = parseFloat(match[1]) * Math.PI/180; const pitch = parseFloat(match[2]) * Math.PI/180; const yaw = parseFloat(match[3]) * Math.PI/180; drone.rotation.x = roll; // Roll drone.rotation.y = yaw; // Yaw drone.rotation.z = pitch; // Pitch } } </script> </body> </html>
Landing Page
This ad does not have a landing page available
Network Timeline
Performance Summary

2

Requests

2

Domains

157KB

Transfer Size

621KB

Content Size

382.0ms

Dom Content Loaded

176.0ms

First Paint

383.0ms

Load Time
Domain Breakdown
Transfer Size (bytes)
Loading...
Content Size (bytes)
Loading...
Header Size (bytes)
Loading...
Requests
Loading...
Timings (ms)
Loading...
Total Time
Loading...
Content Breakdown
Transfer Size (bytes)
Loading...
Content Size (bytes)
Loading...
Header Size (bytes)
Loading...
Requests
Loading...