Tuesday, September 23, 2014

Measure brightness in Lux using BH1750 sensor on Spark Core

A Spark.io library for the BH1750FVI IC.


The BH1750 IC is a light intensity sensor module with built-in a 16 bit AD converter generating digital signal. With the BH1750 Light Sensor intensity can be directly measured by the luxmeter, without needing to make calculations.

This library provides function to measure lux through I2C on a Spark Core.


Code

Notes
  • read risk disclaimer
  • excuse my bad english

Monday, September 8, 2014

A DS18B20 1-wire digital thermometer AVR ATmega library

--ref 2012

updated to version 02

DS18B20 is a programmable resolution 1-wire digital thermometer.
It has an operating temperature range of -55°C to +125°C and is accurate to ±0.5°C over the range of -10°C to +85°C.

This library is an AVR implementation to retrive temperature from DS18B20.

Built using the reference document: "Using DS18B20 digital temperature sensor on AVR microcontrollers" by Gerard Marull Paretas, 2007.


You just have to select the port where the temperature sensor is connected.
This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 1MHz.

Changelog
  • 02: fixed negative temperature readings
  • 01b: fixed schematics
  • 01: first relase
Code
Notes
  • read risk disclaimer
  • excuse my bad english