background image

 

 

4.

 

Usage 

This Grove-Encoder is very easy to use with the 

Encoder Lib

 designed by seeedstudio. Simply connect this 

module to the D2 connector of Base Shield and you can start using. The following is a introduction of how 

to make a 

Circular LED bar

 (the idea came from 

seeedstudio wish

 

This Circular LED bar consists of an Encoder and 

Grove-CircularLED

 module. Connect the two modules 

to Base shield as the following picture: 

 

 

In the project, the 

TimeOne Lib

 and 

Encoder Lib

 and 

CircularLED Library

 are needed. Download all the 

librarys and install them to your Arduino IDE. 

 

Restart 

the 

Arduino 

IDE 

and 

open 

the 

example 

by 

the 

path :File->Examples->Encoder->EncodeCircuiBar. 

 

#include <CircularLED.h> 

#include <Encoder.h> 

#include <TimerOne.h> 

CircularLED circularLED

;

 

unsigned

 

int

 LED

[

24

];

 

int

 index_LED

;

 

void

 setup

()

 

{

 

    encoder

.

Timer_init

();

 

}

 

Summary of Contents for 111020001

Page 1: ...1 Grove Encoder Version 1 0 Release date 9 22 2015 Wiki http www seeedstudio com wiki Grove_ _Encoder Bazaar http www seeedstudio com depot Grove Encoder p 1352 html ...

Page 2: ...2 Document Revision History Revision Date Author Description 1 0 Sep 21 2015 Victor He Create file ...

Page 3: ...3 Contents Document Revision History 2 1 Introduction 2 2 Features 3 3 Specifications 4 4 Usage 5 5 Resources 8 6 Support 9 ...

Page 4: ...ision of Seeed Technology Inc this manual has been compiled and published which covered the latest product description and specification The content of this manual is subject to change without notice Copyright The design of this product including software and its accessories is under tutelage of laws Any action to violate relevant right of our product will be penalized through law Please conscious...

Page 5: ...from the axis and output the signal by electronic pulse The Grove Encoder is one of the Grove series and has a standard Grove interface When you need to add a rotary knob to your project for example a volume knob for a speaker a selection panel or a digital input this will be your first choice ...

Page 6: ...3 2 Features Incremental encoder Grove Interface 360 degree rotary ...

Page 7: ...4 3 Specifications Item Min Typical Max Unit Voltage 4 5 5 5 5 VDC Current 10 20 30 mA Dimension 20x 20 mm Net Weight 12 Gram ...

Page 8: ... consists of an Encoder and a Grove CircularLED module Connect the two modules to Base shield as the following picture In the project the TimeOne Lib and Encoder Lib and CircularLED Library are needed Download all the librarys and install them to your Arduino IDE Restart the Arduino IDE and open the example by the path File Examples Encoder EncodeCircuiBar include CircularLED h include Encoder h i...

Page 9: ...ex_LED else index_LED if index_LED 0 index_LED 0 SenttocircularBar index_LED encoder rotate_flag 0 void SenttocircularBar int index for int i 0 i 24 i if i index LED i 0xff else LED i 0 circularLED CircularLEDWrite LED Upload it to your Arduino Seeeduino please refer to here to learn how to upload sketches You can see ...

Page 10: ...7 Note It is able to generate another signal when it s being pressed down However due to the limitation of the number of Grove signal cable the module is made without output of this signal ...

Page 11: ...8 5 Resources Encoder Spec Demo in Arduino forum TimeOne Lib Encoder Lib Grove Encoder Eagle files ...

Page 12: ...9 6 Support If you have questions or other better design ideas you can go to our forum or wish to discuss ...

Reviews: