What is ZigBee? What is IEEE 802.15.4? How is ZigBee different from other wireless standards (e.g. Bluetooth)? What are the real-life applications of ZigBee? How reliable is the data delivery? How long is the battery life? What are the cost considerations for ZigBee implementation? How long is the Transmission Range? How high is the Data Rate? What is the Data Latency for ZigBee Networks? How large/small a ZigBee Network can be? How is the Data Security provided? What is ZigBee Stack? What Subunits can be on a Node? What is called ZigBee Application? What are the ZigBee Device Descriptors? What is ZigBee Device Profile? What is ZigBee Stack Profile? What are the ZigBee Device Objects? How does a Device/Service Discovery process work? What are the Clusters, ZigBee Binding and Binding Table? How is Addressing and Messaging done in a ZigBee network? What types of ZigBee Devices exist in a network? What Topologies are supported by ZigBee? What is ZigBee network Gateway?
Roll Rate
File: In sw/airborne/fw_h_ctl.c we define the roll rate loop: float cmd = throttle_dep_pgain * ( err + h_ctl_roll_rate_igain * roll_rate_sum_err / H_CTL_ROLL_RATE_SUM_NB_SAMPLES + h_ctl_roll_rate_dgain * d_err);Note that the roll Pgain is variable with throttle and multiplies through the entire equation affecting the I and D terms as well for ease of tuning.
//dirt cheap wireless TX
//generates 38kHz carrier wave on pin 9 and 10
//sends data via TX every 500ms
void setup()
{
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
// Clear Timer on Compare Match (CTC) Mode
bitWrite(TCCR1A, WGM10, 0);
bitWrite(TCCR1A, WGM11, 0);
bitWrite(TCCR1B, WGM12, 1);
bitWrite(TCCR1B, WGM13, 0);
// Toggle OC1A and OC1B on Compare Match.
bitWrite(TCCR1A, COM1A0, 1);
bitWrite(TCCR1A, COM1A1, 0);
bitWrite(TCCR1A, COM1B0, 1);
bitWrite(TCCR1A, COM1B1, 0);
// No prescaling
bitWrite(TCCR1B, CS10, 1);
bitWrite(TCCR1B, CS11, 0);
bitWrite(TCCR1B, CS12, 0);
OCR1A = 210;
OCR1B = 210;
Serial.begin(2400);
}
void loop()
{
Serial.println("testing testing testing");
delay(500);
}
To decode what the remote was sending, I used an oscilloscope and a small photodiode. The photodiode generates a small amount of voltage when light hits it, and responds to changes in light level quickly enough that the oscilloscope can draw a really nice plot of the signal. I have a Parallax USB oscilloscope, which is perfect for showing the command pulses and is just fast enough to find the modulation frequency. As an aside, I’m really happy with the Parallax oscilloscope for projects like this. It is simple to use and I love being able to save images to share with people.
Here’s what two of the commands from the dimmer remote look like. The top signal is the “fade lights up” command, and the bottom one is “fade lights down”:
![]()
Materials
- Current Transducers - $46.00 for 2
- Arduino Diecimilia Microcontroller ~ $20
- Arduino Ethernet Shield ~ $45
- Small sheet plexiglass with mounting screws and standoffs ~ $5
- Router capable of running openwrt or something can serve a cgi script (optional) ~ $40
- Web server to host the power charts (optional) ~ $5/month
Total cost ~ $110 (not counting what I already had lying around) If money is tight there are a few things that can make this cheaper by about fifty bucks:
void httpRequest()
{
byte theByte;
xPortSerial.print("GET ");
xPortSerial.print(PHP_PAGE_LOCATION);
// value0 = 123 and value1 = 456
// You should change these to be your sensor values or whatever you want to send
// (see php code if you want to add more values or change the names value0/value1
xPortSerial.print("?value0=123&value1=456");
xPortSerial.print(" HTTP/1.1n");
xPortSerial.print(WEB_HOST);
while(!xPortSerial.available()) {} // Just loop until available
theByte = xPortSerial.read();
if (theByte != 0)
Serial.println("Passed.");
else
Serial.println("Failed.");
}
Introducing Bitlash
Bitlash is an open source interpreted language shell for the Arduino serial port. It runs on the Arduino and interprets commands that you type in a terminal window or send programmatically:
bitlash v0.95a here! ... > print "hello, world", analogRead(3) hello, world 552Bitlash is a development and prototyping tool for those situations where you need to bang some bits on the Arduino but writing a sketch in C is premature. The Bitlash command language is very similar to Arduino C and includes a large repertiore of the familiar Arduino C functions so you can hack your hardware from the serial command line or even over the internet via telnet.