Grove - 4-Digit Display Release date: 9/20/2015 Version: 1.0 Wiki: http://www.seeedstudio.com/wiki/Grove_-_4-Digit_Display Bazaar: http://www.seeedstudio.com/depot/Grove-4Digit-Display-p-1198.
Document Revision History Revision Date Author Description 1.0 Sep 21, 2015 Victor.
Contents Document Revision History ···································································································2 1. Introduction ···················································································································2 2. Features··························································································································3 3.
Disclaimer For physical injuries and possessions loss caused by those reasons which are not related to product quality, such as operating without following manual guide, natural disasters or force majeure, we take no responsibility for that. Under the supervision 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.
1. Introduction Grove - 4-Digit Display module is a 12-pin module. In this module, we utilise a TM1637 to scale down the number of controlling pins to 2. That is to say, it controls both the content and the luminance via only 2 digital pins of Arduino or Seeeduino. For projects that require alpha-numeric display, this can be a nice choice.
2. Features 4 digit red alpha-numeric display Grove compatible interface (3.
3.
4. Specifications Item Min Typical Max Unit Voltage 3.3 5.0 5.5 VDC Current 0.
5. Interface functions Grove interface - Can be connected to digital port on Grove - Base Shield. 4 - Digit display - Common anode digital tube.
6. Usage 6.1 With TI LaunchPad Displaying the Numbers (4-Digital-Display) This example demonstrates how to display some digital numbers using a Grove-4-Digital Display. /* * TM1637.cpp * A library for the 4 digit display */ #include "TM1637.h" #define CLK 39 //pins definitions for TM1637 and can be changed to other ports #define DIO 38 TM1637 tm1637(CLK,DIO); void setup() { tm1637.init(); tm1637.
int8_t ListDisp[4]; unsigned char i = 0; unsigned char count = 0; delay(150); while(1) { i = count; count ++; if(count == sizeof(NumTab)) count = 0; for(unsigned char BitSelect = 0;BitSelect < 4;BitSelect ++) { ListDisp[BitSelect] = NumTab[i]; i ++; if(i == sizeof(NumTab)) i = 0; } tm1637.display(0,ListDisp[0]); tm1637.display(1,ListDisp[1]); tm1637.display(2,ListDisp[2]); tm1637.display(3,ListDisp[3]); delay(300); } } 6.
Arduino Mega and Grove - 4-digit display: 、 3. Connect Arduino/Seeeduino to PC via a USB cable. 4. Download the 4-Digit Display library and TimerOne library. Unzip and put them in the libraries file of Arduino IDE by the path: ..\arduino-1.0\libraries. 5. Restart the Arduino IDE, open one demo code you like, for example ClockDisplay directly by the path:File -> Example ->DigitalTube->ClockDisplay.
6. Upload the demo code and the clock will be ticking in a few seconds. Please click here if you do not know how to upload.
6.3 With Raspberry Pi 1. You should have got a raspberry pi and a grovepi or grovepi+. 2. You should have completed configuring the development environment, otherwise follow here. 3. Connection. Plug the sensor to grovepi socket D5 by using a grove cable. 4. Navigate to the demos' directory: cd yourpath/GrovePi/Software/Python/ To see the code nano grove_4_digit_display.
time.sleep(.5) # 4 Digit Display methods # grovepi.fourDigit_init(pin) # grovepi.fourDigit_number(pin,value,leading_zero) # grovepi.fourDigit_brightness(pin,brightness) # grovepi.fourDigit_digit(pin,segment,value) # grovepi.fourDigit_segment(pin,segment,leds) # grovepi.fourDigit_score(pin,left,right) # grovepi.fourDigit_monitor(pin,analog,duration) # grovepi.fourDigit_on(pin) # grovepi.fourDigit_off(pin) while True: try: print "Test 1) Initialise" grovepi.fourDigit_init(display) time.sleep(.
grovepi.fourDigit_number(display,56,leading_zero) time.sleep(.5) grovepi.fourDigit_number(display,567,leading_zero) time.sleep(.5) grovepi.fourDigit_number(display,5678,leading_zero) time.sleep(.5) print "Test 5) Set individual digit" grovepi.fourDigit_digit(display,0,2) grovepi.fourDigit_digit(display,1,6) grovepi.fourDigit_digit(display,2,9) grovepi.fourDigit_digit(display,3,15) # 15 = F time.sleep(.5) print "Test 6) Set individual segment" grovepi.fourDigit_segment(display,0,118) # 118 = H grovepi.
grovepi.fourDigit_score(display,12,59) time.sleep(.5) print "Test 9) Monitor analog pin" seconds = 10 grovepi.fourDigit_monitor(display,sensor,seconds) time.sleep(.5) print "Test 10) Switch all on" grovepi.fourDigit_on(display) time.sleep(.5) print "Test 11) Switch all off" grovepi.fourDigit_off(display) time.sleep(.5) except KeyboardInterrupt: grovepi.fourDigit_off(display) break except IOError: print "Error" 5. Run the demo. sudo python grove_4_digit_display.py 5.
7. Resources Grove - 4-Digit Display V1.
8. Related Projects If you want to make some awesome projects by 4-Digit Display, here's one project for reference. Air Quality Box With this demo, we can see the air quality data on 4-Digit Display. I want to make it. More Awesome Projects by 4-Digit Display Share Your Awesome Projects with Us Born with the spirit of making and sharing, that is what we believe makes a maker. And only because of this, the open source community can be as prosperous as it is today.
official launch, and in return we expect valuable feedback from them to help us improve the product performance and user experience. And in most cases when our Core Users have some good ideas of making things, we'll offer hardware pieces, PCBA services as well as technical support. Besides, further commercial cooperation with the Core Users is highly possible. Get more information about Core User, please email to: recipe@seeed.
9. Support If you have questions or other better design ideas, you can go to our forum or wish to discuss.