Tuesday, October 30, 2012

AVR Atmega 74HC595 library 01

74HC595 is a 8-bit serial-in, serial or parallel-out shift register.



74HC595 ics are usefull to expand output ports of a micro.
This library implements a way to setup 74HC595 pins.

This library is inspired on bildr 74hc595 library for arduino http://bildr.org/2011/08/74hc595-breakout-arduino/.
Setup parameters in l74hc595.h
This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 1MHz.



Code


Notes
  • read risk disclaimer
  • excuse my bad english

Monday, October 22, 2012

AVR Atmega ADXL345 accelerometer library 02 + processing

ADXL345 3-axis Accelerometer AVR Atmega library.



The ADXL345 is a small, thin, low power, 3-axis accelerometer with high
resolution (13-bit) measurement at up to ±16 g. Digital output data is
formatted as 16-bit twos complement and is acces-sible through either
a SPI (3- or 4-wire) or I2C digital interface.


User can setup measurement mode to 2/4/8/16G.
Calibration is suggested to get more accurate paramenters.


Setup parameters are stored in file adxl345.h
This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 1MHz.


Code


Notes
  • read risk disclaimer
  • excuse my bad english

Monday, October 15, 2012

AVR Atmega BMP085/BMP180 pressure sensor library 01

update: checked and working on BMP180 too

BMP085/BMP180 Barometric Pressure Sensor AVR Atmega library.



The BMP085 is a high-precision, low-power barometric pressure sensor.
The BMP085 offers a measuring range of 300 to 1100 hPa with an absolute accuracy of down to 0.03 hPa.

User can setup parameter in file bmp085.h.
User can select the mode of operation, and the offset for the reading, also can enable an avarage filter on measurements. It can measure pressure, altitude, and temperature.

This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 1MHz.





Code


Notes
  • read risk disclaimer
  • excuse my bad english

Tuesday, October 9, 2012

AVR Atmega MMA7455 accelerometer library 02 + processing

MMA7455 3-axis Accelerometer AVR Atmega library.



MMA7455 is a very low power 3 axis digital accelerometer from Freescale
Semiconductors. It's micro machined nano structure is capable of measuring
acceleration along its X, Y and Z axes.


User can setup sensitivity to 8bit, or 10bit, and measurement mode to 2/4/8G.
You should calibrate the sensor before use it, to calibrate it collect values
placing the accelerometer on every position of an ideal cube and then edit
calibration offset values.

For my tests calibration is done using the method proposed here: Using an Accelerometer for Inclination Sensing [Analog Devices]
A processing visualization tool is provided.
Attitude estimation can be done in firmware or in the visualization tool.
To estimate pitch and roll:

Code


Notes
  • read risk disclaimer
  • excuse my bad english