HIPPIE/examples/BasicMoves/BasicMoves.ino

77 lines
1.3 KiB
Arduino
Raw Normal View History

2017-12-11 22:41:21 +00:00
// This examples shows the basic moves of the Hippie Library
2017-12-11 22:35:47 +00:00
#include <Hippie.h>
#include <Oscillator.h>
const char* ssid = "Hippie";
Hippie hippie;
void setup()
{
Serial.begin(115200);
/*
This function is used to config Hippie, it has the following parameters
- (int) pin of the upper left servo
- (int) pin of the upper right servo
- (int) pin of the lower left servo
- (int) pin of the lower right servo
*/
hippie.init(25, 13, 26, 16);
}
void loop()
{
2017-12-11 22:41:21 +00:00
hippie.new_walk();
hippie.home();
delay(500);
// backward, shit piece
hippie.new_walk(4, 750, 2);
2017-12-11 22:41:21 +00:00
hippie.home();
delay(500);
// left
hippie.new_turn();
hippie.home();
delay(500);
// right
hippie.new_turn(2,1000,2);
2017-12-11 22:41:21 +00:00
hippie.home();
delay(500);
hippie.shakeLeg(); // TODO: Specify which leg
hippie.home();
delay(500);
// left moonwalk
hippie.moonwalker();
hippie.home();
delay(500);
// right moonwalk
hippie.moonwalker(1, 900, 50, -1);
hippie.home();
delay(500);
// jump (it is not really a jump)
hippie.jump();
hippie.home();
delay(500);
/*
// Here is some more to experiment with
hippie.swing();
hippie.tiptoeSwing();
hippie.jitter();
hippie.bend();
hippie.flapping();
hippie.crusaito();
hippie.test_pos();
*/
2017-12-11 22:35:47 +00:00
}