www.keyestudio.com
Wiring guide:
Ultrasonic sensor
VCC
Trig
Echo
Gnd
(6) Test Code:
/*
keyestudio smart turtle robot
lesson 5.1
Ultrasonic sensor
http://www.keyestudio.com
*/
int trigPin = 12;
int echoPin = 13;
long duration, cm, inches;
void setup() {
//Serial Port begin
Serial.begin (9600);
//Define inputs and outputs
keyestudio V5 sensor shield
→
→
→
→
// Trigger
// Echo
5v(V)
12(S)
13(S)
Gnd(G)
97
Need help?
Do you have a question about the Smart Little Turtle Robot V3 and is the answer not in the manual?
Questions and answers