It is time for fun. If you accepted that using Android phone to control hardware is fun:) Android become very popular and if you into microcontrollers it is pity not to use that knowledge for making cool applications. If you experienced with microcontrollers it is useful to expend your knowledge with any object oriented language. That can be useful for future job opportunities. For Android you need to know Java programming and usage of Eclipse IDE for Java developers. Maybe sounds hard, but today there are a lot of free online courses about Android and plenty of examples and complete projects.
The Serial Peripheral Interface (SPI) module is a synchronous serial interface useful for communicating with other peripheral or microcontroller devices. These peripheral devices may be Serial EEPROMs, shift registers, display drivers, A/D converters, etc.Block diagram of the SPI module is shown on picture. Depending on the variant, the dsPIC30F family offers one or two SPI modules on a single device. SPI1 and SPI2 are functionally identical. The SPI2 module is available in many of the higher pin count packages (64-pin and higher), while the SPI1 module is available on all devices.
In article Rotating office chair angular position and rotation speed measurement using gyroscope and ATmega16 we explained how to use gyroscope LISY300 and atmega16. If you are interesting how gyroscope works, read previous linked articles. In this article we will give you same project but reprogrammed for dsPIC30F4013. This is also example how to use Serial Peripheral Interface (SPI) module for dsPIC30F series of microcontrollers. More about basic SPI configuration and functions, read in article dsPIC30F4013 Serial Peripheral Interface (SPI) example.
More information about NDIR sensors are avaiable in article Non-Dispersive Infrared (NDIR) gas sensors. The IR gas sensor contains a lamp which is pulsed at low frequency by a lamp drive circuit. The pulses of infrared radiation reflect internally to provide a long path through the target gas. Pyroelectric detectors (pyros) are used to detect the change in infrared signal. The active pyro is sensitive to changes at IR wavelengths which are typically absorbed by the gas being detected. The reference pyro is sensitive to changes at a nearby IR wavelength which is not absorbed by the gas being detected.