-
Notifications
You must be signed in to change notification settings - Fork 0
Shake
Tiogaplanet edited this page Oct 9, 2018
·
4 revisions
Read whether MiP has been shaken (robot abuse!).
bool hasBeenShaken()
Returns whether MiP has been shaken since the previous call.
None
- true if MiP has been shaken by the user since the previous call.
- false otherwise.
#include <mip_esp8266.h>
MiP mip;
void setup() {
bool connectResult = mip.begin();
if (!connectResult) {
Serial.println(F("Failed connecting to MiP!"));
return;
}
Serial.println(F("Shake.ino - Detect shakes."));
}
void loop() {
if (mip.hasBeenShaken()) {
Serial.println(F("Shake detected!"));
}
}🔗 Quick Links: Main Repository • Report an Issue • Wiki Home
An open-source API for the WowWee MiP Robot. Licensed under Apache-2.0.
- MiP
- MiPChestLED
- MiPClapSettings
- MiPDebug
- MiPHardwareInfo
- MiPHeadLEDs
- MiPIRDongleCode
- MiPSoftwareVersion
- MiPStatus
- MiP_Battery
- MiP_ChestLED
- MiP_Clap
- MiP_EEPROM
- MiP_Gesture
- MiP_HeadLEDs
- MiP_Infrared
- MiP_Mode
- MiP_Motion
- MiP_Odometer
- MiP_Position
- MiP_Radar
- MiP_Serial
- MiP_Shake
- MiP_Sound
- MiP_Version
- MiP_Weight
- MiP_WiFi