GithubHelp home page GithubHelp logo

tappoz / tinkerforgetestproject Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.69 MB

A minimum working example for the IoT using Tinkerforge technologies to show on an LCD screen the value coming from a light sensor

Java 100.00%

tinkerforgetestproject's Introduction

Tinkerforge building blocks for IoT (Internet of Things)

This project provides a minimum working example of a light sensor connected to an LCD screen to show a number representing the luminosity detected by the sensor.

The building blocks (or bricks and bricklets according to Tinkerforge terminology) are:

The Master brick connects and controls the other bricklets (the light sensor and the LCD display).

Setup

Under Linux Debian/Ubuntu you need to install a couple of deb packages

These packages have dependencies on libusb and some other python related packages, make sure to install those dependencies as requested by the dpkg command.

Tinkerforge components work on unique identifiers (cfr. the UID in the project code).

Another intersting brick is the RED brick, you need to plug it on top of the Master brick (cfr. http://www.tinkerforge.com/en/doc/Hardware/Bricks/RED_Brick.html). It contains a Cortex A8 processor with GPIO and a running Linux Operating System. If you decide to develop your application using the RED brick, then you need to compile your source code for that architecture. This is really easy when using the Brick viewer.

In the following image you can see the Master brick on the left, controlling the LCD bricklet and the Ambient light bricklet. The Master brick then is attached to the laptop via a USB cable.

The main setup

Technologies

Tinkerforge provides a really flexible environment with a lot of supported programming languages.

I decided to go for Java 8 with Gradle to build the project.

On the command line:

$ # BUILD THE PROJECT
$ gradle clean fatJar
[...]
$ # RUN IT!
$ java -jar build/libs/TinkerForgeTestProject-fatJar-1.0.jar light
Illuminance: 60.6 Lux
Press key to exit

LCD Backlight turned off
Disconnected
$ 

Running the Java JAR then you can see the output on the command line. Please note that the illuminance information is displaied also on the LCD screen, after turning on the backlight, before turning it off.

Acknowledgment

A big thank you to Sven Ruppert who introduced these great toys during a Hack Lab organised by the London Java Community in January 2015.

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.