RGB Lantern Open Engineering, LLC dba AeroDyne Labs www.aerodynelabs.com Copyright (c) <2012> <Matthew E. Nelson> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Pin diagram for 18F2520 Port A Port B Port C RA0 - PWR LED RB0 - Mode select RC0 RA1 - Light sensor RB1 - Mode select RC1 RA2 - Temp Sensor RB2 - Mode select RC2 RA3 - Humidity RB3 RC3 - I2C Clk RA4 - Pressure RB4 RC4 - I2C Data RA5 - RB5 RC5 RA6 - RB6 - ICSP RC6 - Serial TX RA7 - RB7 - ICSP RC7 - Serial RX */ Revision: 1.0 PLEASE NOTE Currently, this has been tested to compile with the C18 compiler, and has been tested with version 3.40 of the C18 compiler. It will not compile under XC8. I plan to re-write the code for the newer XC9 compiler…someday. Revision History: 1.0 - Initial design/program - MEN RGB Lantern Project The RGB Lantern Project is designed to read in sensor inputs and then change the output of the BlinkM module accordingly. The BlinkM module was choosen as it also contains additional pre-programmed modes that can easily be accessed using the I2C bus. In addition, it is very possible to chain multiple BlinkM modules for added effects as well. The premise of the project is to have this as an outdoor lantern that will read in temperature, humidity and pressure data. The RGB LEDs can then respond to these sensors accordingly. In addition to sending this information by color information, an xBee module was also included to give data via the 18F2520 UART. A simple ASCII menu system was also developed so the user can change modes of the lantern in addition to obtaining data from the sensors