vogelchr / vserial-am2302

ATmega32u4 USB interface to a AM2302 Temperature/Humidity Sensor
0 stars 0 forks source link

README

This is a simple demo to compile a AVR appllication using the LUFA library out of tree.

Currently it runs on a "Olimexino 32U4" board and just echos back the characters received on a virtual serial port.

AM2302 Interface

Additionally, if you connect a AM2302 temperature and relative humidity sensor to port D4/ICP1/ADC8 (digital 4 on the "Arduino board") you can...

Compared to most other code that can be found on the internet, this library uses the input capture functionality of Timer/Counter1 to read in the bits. It does not require the MCU to busy-wait until all bits are clocked in.

Compileing

To compile this program, you have to have LUFA-130901 unpacked in ../LUFA-130901, or adjust the Makefile accordingly.

Flashing

Run ./flash.sh to flash the resulting binary using avrdude and a AVR dragon programmer in ISP mode.

Copyright

This code is (c) 2014 Christian Vogel vogelchr@vogel.cx.

It is heavily based on the VirtualSerial example included in the LUFA (Lightweight USB Framework for AVRs) library, which is licensed according to the copyright statement included below:

/* Copyright 2013 Dean Camera (dean [at] fourwalledcubicle [dot] com)

Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.

The author disclaims all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. */