Giter Site home page Giter Site logo

lichtsensor's Introduction

Abstract

A simple USB light detector consisting of a simple circuit based on an ATtiny44 and a LED. Readings are accomplished by running a userspace tool on the host. Each run will return the most recent measurement.

Measurements

Measured values will be within 0…4294967295 (32 bit value), with 0 meaning "pretty bright" and higher values meaning "less light".

Sample Readings

Value Environment
8…15 average desk lamp
30.000…60.000 clouded sky
> 800.000 sensor hidden in a drawer

Compiling the source

Firmware

Run make within the avr directory. Make sure to the the fuses to "External Crystal" and disable CLKDIV8 (see avr/fuses for the values I used).

Client

The sample client is a single file. You'll need libusb to compile it. Usually, you can just install the devel package (apt-get install libusb-dev) on Debian-like distributions.

To compile the client, just run:

gcc -o lichtsensor client/lichtsensor.c -lusb

Taking readings

Just run the lichtsensor binary after connecting the sensor:

% ./lichtsensor
18214

If you get a Operation not permitted, try running it as root and take a look at the libusb FAQ.

Schematic

Schematic of Lichtsensor

Pictures

http://imgur.com/a/VfXc4

Further research

The sensor's readings are likely to drift over time as there is no compensation or calibration yet.

lichtsensor's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.