Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
com/projects/robosapien-w-bluetooth-remote/
1 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
2 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
3 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
4 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
5 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
6 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
7 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
8 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
9 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
10 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
11 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
void loop()
{
unsigned char val = 0;
unsigned long start, ts, dur;
while(digitalRead(irPin)) {
start = micros();
}
Serial.println(val, HEX);
}
12 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
void loop()
{
writeCommand(leftArmUp);
delay(2000);
writeCommand(walkForward);
delay(3000);
writeCommand(rightArmUp);
delay(2000);
writeCommand(turnLeft);
delay(3000);
writeCommand(stopMoving);
delay(500);
writeCommand(burp);
delay(3000);
}
13 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
enum roboCommand {
// only a very small subset of commands
turnRight = 0x80,
rightArmUp = 0x81,
rightArmOut = 0x82,
tiltBodyRight = 0x83,
rightArmDown = 0x84,
rightArmIn = 0x85,
walkForward = 0x86,
walkBackward = 0x87,
turnLeft = 0x88,
leftArmUp = 0x89,
leftArmOut = 0x8A,
tiltBodyLeft = 0x8B,
leftArmDown = 0x8C,
leftArmIn = 0x8D,
stopMoving = 0x8E,
// noises
whistle = 0xCA,
roar = 0xCE,
burp = 0xC2
};
14 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
// preamble
digitalWrite(irPin, LOW);
delayTs(8);
digitalWrite(irPin, HIGH);
pinMode(irPin, INPUT);
}
15 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
16 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
17 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
18 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
19 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
God blesses!!!
Best regards,
Sanyaade
20 of 21 3/31/2018, 2:38 PM
Robosapien w/ Bluetooth remote control — MakeHackVoid https://makehackvoid.com/projects/robosapien-w-bluetooth-remote/
21 of 21 3/31/2018, 2:38 PM