InfoHole A blog by Gordon Page

27Jun/110

Radian Pro Setup & Flight Videos

Was given this Radian Pro by my family for my birthday, decided to give it a try (not having flown a plane with ailerons before) after I destroyed my highly modified trusty Super Cub LP (perfect plane for beginners!) earlier this week.

 

 

Filed under: Technology, Videos No Comments
14Jun/110

Verifying Integrity Of 9DOF Data Sent To Arduino Mega

In this video I show you how I verify the integrity of data being sent from the 9DOF (9 degrees of freedom) to an Arduino Mega. The only reason for doing this is to ensure that a poor cable connection does not result in the Arduino using corrupted or incorrect X,Y,Z data (which could be catastrophic for a flying craft).

Here's my code for receiving the 9DOF data and checking it, there may be bugs, use at your own risk!


float processByteToVal(int positionInArray, byte theData, float currentTotal)
{
float newData=(float)(theData-48);//turn a byte of 49 into a number of 1, byte of 54 into int 6, etc.
float outputValue=0;

if(positionInArray==0)
{
outputValue=currentTotal+(newData/100);
}
else if(positionInArray==1)
{
outputValue=currentTotal+(newData/10);
}
else if(positionInArray==2)
{
outputValue=currentTotal;
}
else if(positionInArray==3)
{
outputValue=currentTotal+newData;
}
else if(positionInArray==4)
{
if(theData==45)//the original byte passed was a minus sign;
{
outputValue=0-currentTotal;
}
else
{
outputValue=currentTotal+(newData*10);
}
}
else if(positionInArray==5)
{
outputValue=currentTotal+(newData/100);
if(theData==45)//the original byte passed was a minus sign;
{
outputValue=0-currentTotal;
}
else
{
outputValue=currentTotal+(newData*100);
}
}
else if(positionInArray==6)//positionInArray 6 can only ever be a negative sign
{
if(theData==45)//the original byte passed was a minus sign;
{
outputValue=0-currentTotal;
}
}
return outputValue;
}

int getData()
{
int inByte;
int dataFound=0;
while(dataFound<1)
{
if(Serial3.available())
{
inByte = Serial3.read();
return inByte;
dataFound=1;
}
else
{
//delay(1);
}
}
}

void getAttitude() {
int inByte=0;
Serial3.flush();

while(inByte!=58) // 58 is :
{
inByte = getData();
}

//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
inByte = getData();
int xPos=0;
float xVal=0;
byte xData[7];
while(inByte!=44) // 44 is ,
{
if(inByte!=-1) // -1 is not available
{

xData[xPos]=inByte;
xPos++;
}
inByte = getData();
}
int newPos=0;
xPos--;
while(xPos>=0)
{
xVal=processByteToVal(newPos, xData[xPos], xVal);
xPos--;
newPos++;

}

//YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
//YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
//YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
inByte = getData();
int yPos=0;
float yVal=0;
byte yData[7];
while(inByte!=44) // 44 is ,
{
if(inByte!=-1) // -1 is not available
{

yData[yPos]=inByte;
yPos++;
}
inByte = getData();
}
newPos=0;
yPos--;
while(yPos>=0)
{
yVal=processByteToVal(newPos, yData[yPos], yVal);
yPos--;
newPos++;

}

//ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
//ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
//ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
inByte = getData();
int zPos=0;
float zVal=0;
byte zData[7];
while(inByte!=44) // 44 is ,
{
if(inByte!=-1) // -1 is not available
{

zData[zPos]=inByte;
zPos++;
}
inByte = getData();
}
newPos=0;
zPos--;
while(zPos>=0)
{
zVal=processByteToVal(newPos, zData[zPos], zVal);
zPos--;
newPos++;
}

//TOTAL - TOTAL - TOTAL - TOTAL -TOTAL
//TOTAL - TOTAL - TOTAL - TOTAL -TOTAL
//TOTAL - TOTAL - TOTAL - TOTAL -TOTAL
inByte = getData();
//Serial.println ("");
//Serial.print("This is total: ");
int totalPos=0;
float totalVal=0;
byte totalData[7];
while(inByte!=13) // 44 is ,
{
if(inByte!=-1) // -1 is not available
{

totalData[totalPos]=inByte;
//Serial.print(inByte, BYTE);
totalPos++;
}
inByte = getData();
}
newPos=0;
totalPos--;
while(totalPos>=0)
{
totalVal=processByteToVal(newPos, totalData[totalPos], totalVal);
totalPos--;
newPos++;

}
// Serial.print("totalVal is: ");
// Serial.println(totalVal);

float localTotal=xVal+yVal+zVal;

if((abs(totalVal)-abs(localTotal)<=0.03) && (abs(totalVal)-abs(localTotal)>=-0.03))
{
currentXAngle=0-xVal;//currentXAngle and currentYAngle are the gloabl variables that store the current x,y,z that we use throughout the code.
currentYAngle=yVal;
currentZAngle=0-zVal;

//FOR DEBUG PURPOSES ONLY, MUST REMOVE BEFORE FLIGHT!!!!!!!!!!!!!!!!!!!
//currentXAngle=0;
//currentYAngle=0;
imuSuccesses++;
}
else
{
Serial.println("-------------------------The data is NOT NOT NOT NOT NOT NOT valid!!!!!!------------------");
Serial.println("");
imuFailures++;
}
}

Filed under: Robotics No Comments
3May/110

Supermicro SC846TQ-R900B Photos

I just received my Supermicro SC846TQ-R900B server chassis, which I'm going to use to build a 72TB file server (or maybe more, I'll only load in 8x 3TB drives at first, then add more as needed). The chassis has 24 hot-swap drive bays, easily swappable fans, and a hot-swap redundant power supply unit. I won't be using any sort of RAID as my own very simple file storage system duplicates data on multiple drives/servers. You can rent a 72TB server with 100mbit - 4gigabit dedicated bandwidth from Incero.

24 Hot-Swap Drive Bays In 4U

24 Hot-Swap Drive Bays In 4U

Dummy Drives Pre-Installed To Keep Trays From Bending

Dummy Drives Pre-Installed To Keep Trays From Bending

 

SATA Backplane

SATA Backplane

Easily Swappable Fans

Easily Swappable Fans

Air Flow Control

Air Flow Control

Hot-Swap Redundant Power Supply

Hot-Swap Redundant Power Supply

Back Of Chassis

Back Of Chassis

 

10Nov/103

COD: Black Ops Graphics Disappointing

Oh man, what a disappointment, I just finished downloading "Call Of Duty: Black Ops" and played the game for 10 minutes before quitting, the graphics are just really awful when compared to the latest Medal of Honor! The shading is not good, the detailing on the buildings is poort, and the physics don't seem to be very good either.

Below is screenshot of COD Black Ops, what do you think about it? Upload your own screenshot at UploadScreenshot.com and post it in the comments section below along with your thoughts.

Click here to view full size

17Aug/103

UploadScreenshot.com Growth, 4x

Further to my last post regarding UploadScreenshot.com usage, the site has continued to grow. The number of people viewing the images, number of image loads, and number of websites displaying screenshots have all quadrupled.

8/16/2010
~60,000 image loads per day, ~38,000 unique people per day, ~1,129 unique websites per day

4/20/2010
~15,000 image loads per day, ~9,000 unique people per day, ~220 unique websites per day

Below is a screenshot of the latest data (8/16/2010) click on it to view the full sized version!

Click here to view full size

13Jul/106

Arduino Mega 2.4Ghz R/C Receiver Code

Since posting this video, a few people have been asking for the source code. I don't have that exact code available still, but here is some code which takes 3 input values from an R/C receiver and outputs them to the screen.

I took this code from another of my projects, and just deleted all the non-relevant code. I may have inadvertently deleted parts of the code that I shouldn't have, so if you have come across any errors just leave a comment below with details and I'll fix it.

#include

//these store the current transmitter positions/values
unsigned long transmitterThrottlee=0;
unsigned long transmitterLeftRight=0;
unsigned long transmitterForwardBack=0;

void setup()
{
pinMode (8, INPUT);
pinMode (9, INPUT);
pinMode (10, INPUT);

Serial.begin(57600);
Serial.println("Done with setup");
}

void checkTransmitter()
{
transmitterThrottlee = (pulseIn (9, HIGH, 100000))/10; //read RC channel, wait max of 0.1 seconds for pulse
transmitterLeftRight = (pulseIn (8, HIGH, 100000))/10; //read RC channel, wait max of 0.1 seconds for pulse
transmitterForwardBack = (pulseIn (10, HIGH, 100000))/10; //read RC channel, wait max of 0.1 seconds for pulse
}

void loop()
{
checkTransmitter();//check the data being received by the transmitter.
Serial.print ("data: ");//if we decrease altitude we should check for landing, and slow our decent when we get close to the ground.
Serial.println (transmitterThrottle);
Serial.println (transmitterLeftRight);
Serial.println (transmitterForwardBack);

delay (200);
}

Filed under: Robotics 6 Comments
6May/100

Robot Balancing On A Ball

Here's a cool video of a robot balancing on a ball. Presumably it uses a few gyroscopes, magnetometers, etc.

20Apr/100

UploadScreenshot.com Stats

I implemented a custom stats tracking feature on UploadScreenshot.com a couple of months which allows me to track image load data, even without pageviews. The system works by loading each image dynamically and updating a database with the relevant information.

Below is a screenshot of the current site stats, click on it to enlarge it. It shows approximately 15,000 image loads per day, viewed by ~9,000 unique people, across ~220 unique websites.

Click here to view full size

The site also received a bit of love in the design department in the last couple of weeks, with some CSS clean up and a new logo.

Click here to view full size

Update April 23rd, 2010:

Click here to view full size

17Apr/100

Office Pics

I just snapped a few pics of the office. It works really well for us, with plenty of space to work on our various projects. It is usually very bright in the office thanks to the 6ft+ tall windows, but today was one of very few overcast days here in Austin.

Click here to view full size Click here to view full size Click here to view full size Click here to view full size Click here to view full size Click here to view full size Click here to view full size

7Apr/100

UploadScreenshot.com Firefox Add-On Usage Grows!

The Firefox add-on for UploadScreenshot.com went public (out of beta) a week or so ago, and the number of daily downloads has since shot up to around 90+ from 7 per day. As a result, the active daily user base for the add-on has increased and seems to be further increasing rapidly.

Add-on users represent a small number of the visitors to UploadScreenshot but account for almost 1/4 of all uploads. Further add-on usage growth will result in more site growth, and vice-versa.

Click here to view full size

We completed the API last week, which allows others to develop applications that upload to the site. Now we're working on a chrome extension so that we can extend our reach to more users.

Update April 13th 2010:
The number of daily active users of the add-on continues to grow, with 928 today!
Click here to view full size

Update April 17th 2010:
The number of daily active users of the add-on continues to grow, with 1248 today!
Click here to view full size