Instructables

How to use SRIO library for Arduino

Picture of How to use SRIO library for Arduino
 With SRIO Library  you can extand your Arduino I/O with shift register 4021 and 74HC595
you can find this tutrorial here : http://www.e-licktronic.com/en/content/19-tutorial-library-sriohttp://www.e-licktronic.com/en/content/19-tutorial-library-srio
In this tutorial we will see how to use the library SRIO with Dilicktal Board

For this tutorial you need:
            -1x Midilickuino
            -1x Arduino
            -1x à 8x  Dilicktal
            -Arduino software (version 1.0 or newer)
            -SRIO Library
            -1x  USB cable   

SRIO Library description:

void Initialize();
//Initialize I / O used with Dilicktal

void Led_SR_Write (byte SR_num, byte data);
//Set a value of 8-bit shift register selected
// number of Dilicktal from 0 to 7 (0 => first Dilicktal connected , 1 => second Dilicktal connected...)
// Value sent from 0 to 255
// Example:
// Led_SR_Write(0,255) turns all LEDs ON of the first Dilicktal in the chain.

void Led_Pin_Write (byte Pin_num, byte flag);
//Set 0 or 1 in the Pin Led selected
// The number of pin ranges from 0 to 63 (0 being the first pin of the first Dilicktal ...)
// value sent  1 => ON or 0 => OFF
// Example:
// Led_Pin_Write (34,1) Turn ON the third LED of the fifth Dilicktal in the chain.

void Led_All_On();
// Turns all ON LEDs connected
// Do not need any parameters

void Led_All_Off();
// Turns all OFF LEDs connected
// Do not need any parameters

byte Led_SR_Read (byte SR_num);
// Returns the value (8 bits) of the state of the LEDs on the Dilicktal board selected
// Number of Dilicktal from 0-7 (0 => first Dilicktal connected, 1 => second Dilicktal connected ...)

byte Button_SR_Read (byte SR_num);
// Returns the value (8 bits) of the state of the buttons of the selected Dilicktal
// Number of Dilicktal from 0-7 (0 => first Dilicktal connected, 1 => second Dilicktal connected ...)

byte Button_Pin_Read (byte Pin_num);
// Returns the state of the button, 0 =>  released or 1 => pressed
// The number of pin ranges from 0 to 63 (0 being the first pin of the first Dilicktal ...)
 
Remove these adsRemove these ads by Signing Up
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!