以下代码可通过VNC远程登陆树莓派,通过杜邦线将树莓派与机器人连接,从而达到在电脑上操控小车。
HTML网页代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Robot</title>
<style>
* {
color: red
}
</style>
</head>
<body>
<form action='/' method='post'>
<table align='center' height='90' width='90'>
<tr align='center'><td></td><td><input type='submit' name='function' value='run'></td><td></td></tr>
<tr align='center'>