GEK Wiki / GCU Example Code
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

GCU Example Code

This version was saved 14 years, 8 months ago View current version     Page history
Saved by bk
on August 6, 2009 at 3:13:57 pm
 

Calculate Volumetric Flow Through Orifice Flowmeter

double CalcFlowmeter(double CfA0, double dP, double density, double offset) {

  return CfA0*sqrt(((dP-offset)*2)/density);

}

 

where:

CfAo is determined through flowmeter calibration

dP is the differential pressure across the flowmeter (from Press_Data[i]) in Pascals

density is the density of the gas (1.2 kg/m3 for air, estimated to be 0.95 for wood gas)

offset is the zero offset for the pressure sensor. The zero offset does fluctate with time, ideally the offset should be found before each run (no flow condition)

Manually Pulse Servo

Pending library support for servo control, you can manually control a Futaba servo:

 

void PulseServo(int servo_pin,double angle) {

  // manually pulse servo - up to 2 ms delay will be be an issue w/ more then a few servos, may be ok w/ 3.

  digitalWrite(servo_pin,HIGH);

  delayMicroseconds(1000+angle*5.556);

  digitalWrite(SERVO0,LOW);

}

 

 

Comments (0)

You don't have permission to comment on this page.