Any microcontroller must have I/O pins for taking inputs and providing outputs. The ATXMega32A4U just like any other micro has 34 programmable I/O pins divided unevenly amongst six IO ports. Most I/O ports are 8 bit wide. XMega I/Os have digital, analog and special purpose functions. Some I/O pins have more than one use. A quick view of the XMega I/O pins reveals the purpose of these pins.
The Self-organizing Systems Research Group at Harvard has created a “thousand robot swarm“, named Kilobots, which can self-arrange themselves into shapes and patterns. Each robot in the group moves uses two vibrating motors to move and an infrared TX/RX pair to communicate with its neighbors and to measure their proximity. The Kilobot robot software and hardware design are available open-source for non-commercial use.
A thousand robot swarm
Watch this video to see the robots in action.
Hans de Bruin’s DIY handsfree goggles allows you to record HD video of what you are seeing while having both hands free. He is using big safety goggles as the framework. He has removed the glasses and 3D printed an adapter that fits into the goggles frame and holds a video camera. He also uses a biconvex optical lens between his eye and the camera to enlarge the view of the LCD screen so that he could have a better view of what he is filming.
Handsfree video recording goggles
Here’s an Instructable about a DIY charger for car’s battery with an analog DC ammeter in the front panel. A PIC12F683-based control circuit is enclosed inside which adds some intelligence to this charger. The PIC MCU checks the terminal voltage of the battery being charged in every ten minutes using one of its analog inputs, and if it is found above a set threshold, the charging process is stopped. A relay switch is included into the circuit to connect/disconnect the charger output and the battery terminals.
PIC-based battery charger
Measuring input signal frequency is a common requirement in many applications like tachometer, frequency meter, tone detection, etc. The two classic approaches of frequency measurement are measure the number of cycles in a fixed period of time and measure the time of one cycle. This application note from Cypress discusses the advantages and limitations of these methods and also presents a hybrid approach along with a sample project enabling measurement of frequencies with a typical error of 0.0016% (16 ppm).
Frequency measurement demo