---
# System prepended metadata

title: Robot
tags: [' Talk', Templates]

---

---
title: Robot
tags: Templates, Talk
description: View the slide with "Slide Mode".
---

# Robot Maker

<!-- Put the link to this slide here so people can follow -->
slide:https://docs.google.com/presentation/d/1POpx0dMKzTCuJ2h_2FsgI1d4SMJDjbcL96PRvpiEAsM/edit?usp=drive_web&authuser=0

---

We have a special course in the school

This website is about to introduce our learning process and our accomplishments 

---

## The progress of the course

```flow
st=>start: install Arduino 

e=>end: 撰寫報告
op=>operation: 接線路
op2=>operation: 撰寫程式
op3=>operation: 將過程記錄


st->op->op2->op3->e
```

---

## The slide of the project

---

https://docs.google.com/presentation/d/1POpx0dMKzTCuJ2h_2FsgI1d4SMJDjbcL96PRvpiEAsM/edit?usp=drive_web&authuser=0

---

### The necessary hardware

1. NodeMCU ESP8266
![](https://miro.medium.com/max/2000/1*twdqYz5uyOxTP2gOuCir5g.jpeg)

2. 超音波感測器
![image alt](data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBUUFBcVFBQXGBcaGhsdGxoYGxsbHRobGxsaGxsbFxsbICwkHR0pHhsbJTYlKS4wMzMzHSI5PjkxPSwyMzABCwsLEA4QHRISHjIpIikyMjIyMjIyMDIyMjIyMDIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAK0BJAMBIgACEQEDEQH/xAAcAAABBAMBAAAAAAAAAAAAAAAABAUGBwEDCAL/xABJEAACAQICBgYDDgQFBAIDAAABAgMAEQQhBQYSMUFREyJhcYGRBzKxFCNCUlRicnOSobLB0fAkMzRTFkNjouGCwtLxk6MVRIP/xAAaAQADAQEBAQAAAAAAAAAAAAAAAQQDAgUG/8QAKxEAAgIBAwMFAAAHAQAAAAAAAAECEQMEITESFFETIjJBYQVCUnGBofEj/9oADAMBAAIRAxEAPwC46zekWl5CkMjKbEIxB5EA1Ts+tuLBt07+db4tPLJbTJs2pjiaTTdl33oqiTrdjPlMnnXj/FmN+Uyed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+ERfX71IR/qfl/zUtFRHXw/045yfpUuoj8mD4QUUUGtRGaxWTWKACs0CsUAZorFZoEFFFZoAKKKxQBmiiimAUUUUAFFFFABRRRSAKKKKACiiigAooooAKKKKACiiigBm1pwzSYWVEF2IWw7mU/lW7V+Bkw0SNkwQXpyNFc9Pusd7UR7XaJmwjBQSdpch306aJQrBEpFiI0BHI7IpYyg0Cl0+6wvaiMa9ws0CBRc7Y9hqRwiyqOweyvbKDvFZoUabYXtRF9b8M8j4YKt7SXPZmtSig0UKNNsGzNFFFdiCsVkUUAAoorNAGLUVmigDFZoooAKKKKYBRRRQAUUUUAf/9k=)
3. 擴充版
4. 杜邦線![](https://i.imgur.com/xIQNWvZ.jpg)





---

### The necessary software

---

1. [check here](https://www.arduino.cc/en/software) to downlaod Arduino
2. [check here](https://drive.google.com/file/d/1di1bxuuKS7947Yezd2Y-3wIYxyHi3Qyw/view?usp=drive_web&authuser=0) to downlaod ArduBlock
3. 貼上的網址 
http://arduino.esp8266.com/stable/package_esp8266com_index.json



超音波測距
---

### 原理
---
超聲波測距是利用超聲波在空氣中傳播時間來測距
HC-SR04發射超聲波後遇到障礙反射回來的時間
我們藉由發射和接收的時間差就可得知與物體的實際距離
(2倍距離除上時間)
![link text](https://ithelp.ithome.com.tw/upload/images/20201006/20120093Li8c9gcCRB.png)

#### 接線路的圖
Gnd-Gnd
Vcc-V
echo-D(digital)
Trig-D(digital)

#### 程式

```
void setup() {

}
//void setup() {
      void loop() {
const int trigPin = 5;  
const int echoPin = 6;  

long duration;
int distance;

        pinMode(trigPin, OUTPUT); 
        pinMode(echoPin, INPUT); 
        Serial.begin(9600); 

    // Clears the trigPin
        digitalWrite(trigPin, LOW);
        delayMicroseconds(2);
    
   
        digitalWrite(trigPin, HIGH);
        delayMicroseconds(10);
        digitalWrite(trigPin, LOW);
    
   
        duration = pulseIn(echoPin, HIGH);
    
  
        distance= duration*0.034/2;
    
        Serial.print("Distance: ");
        Serial.println(distance);
        delay(2000);
}
//}
```    
    
* The problem

![](https://i.imgur.com/opTaLlC.png)
>a function-definition is not allowed here before '{' token

### 多設一個setup (一個程式只能有一個setup)

- #### The solution of problem


```
void setup() {

}
      void loop() {
const int trigPin = 5;  
const int echoPin = 6;  

long duration;
int distance;

        pinMode(trigPin, OUTPUT); 
        pinMode(echoPin, INPUT); 
        Serial.begin(9600); 

    // Clears the trigPin
        digitalWrite(trigPin, LOW);
        delayMicroseconds(2);
    
   
        digitalWrite(trigPin, HIGH);
        delayMicroseconds(10);
        digitalWrite(trigPin, LOW);
    
   
        duration = pulseIn(echoPin, HIGH);
    
  
        distance= duration*0.034/2;
    
        Serial.print("Distance: ");
        Serial.println(distance);
        delay(2000);
}

```




















### time table
---
```mermaid
gantt
    title A Gantt Diagram

    section Section
    A task           :a1, 2014-01-, 30d
    Another task     :after a1  , 20d
    section Another
    Task in sec      :2014-01-12  , 12d
    anther task      : 24d
```


---

## My thought


