Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Samples:Calamari Lure

Bruno Dilly edited this page May 30, 2016 · 10 revisions

Calamari Lure samples

Diagram:

calamari-led.svg

Expected behavior/results: This sample uses the Calamari's lever to change the intensity of the light of LED1 and LED2. Their light intensity should change from 0 to maximum.

There are two different ways to control 7-segment displays. Turning each segment on or off using a byte, or sending a value (and the node handles what segments should be on to represent it).

This example shows how to use values. Below there is another example for segments manipulation.

Uses a timer to loop an accumulator from 0 to 15 and display using MinnowBoard's Calamari Lure 7-segment display. It is an example of:

  • wallclock/second node type (emits a package per second)
  • accumulator node type
  • calamari/7seg (controls the Calamari Luire 7-segment display)
  • Using an alias (SevenSegments) for a node type configured in the .conf file

Diagram:

calamari-7seg-value.svg

Expected behavior/results: Upon the sample execution, the seven segments display must start to display hexadecimal numbers, from 0 to F, one per second.

Diagram:

calamari-lever.svg

Expected behavior/results: In this sample, the 7 segments display shows a number (in hexadecimal) from 0 to 15, depending on the position of the lever. So, moving the lever should change the value displayed by the 7seg display.

Diagram:

calamari-7seg-segments.svg

Expected behavior/results: Upon the sample execution, the seven segments display will show the letters of the word 'PLAY'.

Diagram:

calamari-rgb-led.svg

Expected behavior/results: The Calamari lure has a RGB led, identified as LED3 on the board. Running this sample should make this LED blink, changing colors.

Diagram:

calamari-buttons-rgb-led.svg

Expected behavior/results: This sample assigns each one of the buttons (S1, S2 and S3) to a color of the RGB led. Pressing S1 should make the LED red, S2 green and S3 blue. An output is generated in the console, identifying which button was pressed.

Clone this wiki locally