FireFly 2012 v3: restructured into Data/Converter/IK/Servos classes, IR remote, ultrasonic radar head

From 'hexapodV3 28-april-2012-Backup.rar'. Oud/ is the 2011 code it was based on.
This commit is contained in:
mangavalk committed 2012-04-28 16:42:59 +02:00
1 parent 2e063fc0d9
commit f690f307c1
30 files changed
+1990

No files matched your search

@@ -0,0 +1,70 @@
//Data.h Data Structure
#ifndef DATA
#define DATA
#include "Arduino.h"
#include "hexapod.h"
#include "Def.h"
#include "SerD.h"
// LAYOUT
// _U_
// 0==/ \==3
// >***<
// 1===|---|===4
// >***<
// 2==\___/==5
struct Data
{
//MAIN
// Pointers to classes
hexapod FireFly;
//Watchdog
boolean Send;
double LastSendTime;
int WalkTime;
int HeadTime; //100
//Converter
SerD ServoData[6];
float HeadAngle;
int ReadyToSend;
//IK
int HeadPosition;
boolean ReadyToConvert;
float l3;
float s;
//Startup VARIABLES
Data()
{
LastSendTime = 0;
HeadAngle = 0;
HeadTime = 100;
ServoData[0](5, 3, 8);
ServoData[1](8, 3, 0);
ServoData[2](5, 3, -8);
ServoData[3](5, 3, 8);
ServoData[4](8, 3, 0);
ServoData[5](5, 3, -8);
}
};
#endif