OPEN-SMART Rich UNO R3 User Manual Download Page 39

OPEN-SMART    Email: 

[email protected]

 

- 39 - 

 

    int _pin; 

    _pin = touch.get(); 

    switch(_pin) 

    { 

        case TOUCH_OUT1: touchNum = 1;break; 

case TOUCH_OUT2: touchNum = 2;break; 

case TOUCH_OUT3: touchNum = 3;break; 

case TOUCH_OUT4: touchNum = 4;break; 

default: touchNum = _pin;break; 

    } 

    return touchNum; 

 

* disp.init(); // initialization 

  You should write it in the setup function initialize it. 

 

* disp.display(int Decimal); // display range: -999 ~ 9999 

 

* disp.clearDisplay(); // clear the display, nothing display 

 

 

Summary of Contents for Rich UNO R3

Page 1: ...OPEN SMART Name Rich UNO R3 user manual Version v1 0 Date 2017 06 12 OPEN SMART...

Page 2: ...Touch and display 25 7 1 Overview 25 7 2 Upload code for lesson 3 25 7 3 Learn the functions 27 8 Lesson 4 Touch and debounce 29 8 1 Overview 29 8 2 Upload code for lesson 4 29 8 3 Learn the functions...

Page 3: ...Learn the functions 65 18 Lesson 14 Play song with its file name 66 18 1 Overview 66 18 2 Upload code for lesson 14 66 18 3 Learn the functions 68 19 Lesson 15 Knob control volume 69 19 1 Overview 69...

Page 4: ...24 3 Learn the functions 89 25 Lesson 21 Speak clock 91 25 1 Overview 91 25 2 Upload code for lesson 21 91 25 3 Learn the functions 93 26 Lesson 22 Speak time and temperature 95 26 1 Overview 95 26 2...

Page 5: ...OPEN SMART Email catalex_inc 163 com 5 1 Description OPEN SMART UNO R3 Board top view OPEN SMART UNO R3 Type A Kit top view...

Page 6: ...chip use D7 D8 pins to be software serial port you can send commands to switch songs change the volume and play mode and other operations Rotation angle sensor 10K ohm adjustable potentiometer knob an...

Page 7: ...Typical Max Unit Power Supply VCC 3 7 5 5 25 VDC DC Jack Power 7 12 VDC Current VCC 5V 500 mA Speaker Power 3 W Logic interface 5V TTL Supported Card Type Micro SD card 2G Mirco SDHC card 32G File sys...

Page 8: ...the clock point it needs D10 D11 pins to control and display the integer clock stopwatch score and so on 4 Buzzer 5 RTC Clock based on DS1307 high precision real time clock module I2C interface the ad...

Page 9: ...n disconnect the connection between the peripheral module on the board and the Atmega328P 11 Atmega328P Chip 32KB flash with 2KB EEPROM 16MHz the same as Arduino UNO R3 12 Knob Sensor 10K ohm adjustab...

Page 10: ...se make sure you will put the IDE in the English path 2 We recommend you to download Arduino 1 6 5 because our projects use this version Click previous version of the current release and select 1 6 5...

Page 11: ...OPEN SMART Email catalex_inc 163 com 11 3 If you want to download the Arduino 1 8 3 you can click Windows ZIP file for non admin install and then click JUST DOWNLOAD...

Page 12: ...UNO R3 needs 1 Get the libraries from our google drive here The name is Arduino libraries for Rich UNO R3 rar 2 Unzip it and all the four libraries in it must be put in the directory of Arduino 1 xx...

Page 13: ...voice we need in the 22 projects and you can download from our google drive here The name is Voice Sources for TF card rar 2 Format your TF card should not larger than 32GB unzip Voice Sources for TF...

Page 14: ...e CH340G driver from here If your system is MAC OS download here If yours is linux download here NOTE Before plugging the USB cable to the PC you should install the driver first 2 When you have downlo...

Page 15: ...se the window and plug the module to your PC with the USB cable and it will automatically install USB interface driver 5 Then you can find its serial port number mine is COM3 you should find yours and...

Page 16: ...o different USB port you should select again 1 Select board Click arduino exe in the directory of D arduino 1 6 5 r2 to start the Arduino IDE Click Tools to select Arduino Genuino Uno for our Rich UNO...

Page 17: ...button and increase the service life The buzzer has only two status such sound and silence In this lesson you can learn about the touch pad control method how to turn on and turn off the buzzer 5 2 Up...

Page 18: ...lick Upload button to upload the code to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as y...

Page 19: ...upload to the board 5 4 Learn the functions 1 You can find that at the beginning of all lessons code is include Wire h include SoftwareSerial h Because the RichUNO library files use Wire h and Softwar...

Page 20: ...unction and then write the code what you want the board to do in loop function which runs cyclically 5 Functions buzzer on turn on the buzzer buzzer off turn off the buzzer You can try to use delay fu...

Page 21: ...n so it is often use for watches Clock Induction Cooker In this lesson you can learn how to display numbers which can be displayed in bits or you can display integers directly 6 2 Upload code for less...

Page 22: ...ck Upload button to upload the code to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you...

Page 23: ...or example TM1637 disp 10 11 define a TM1637 object and display connect to D10 D11 of Rich UNO R3 board 4 Two necessary functions Each example code should inclue the two necessary functions void setup...

Page 24: ...rightness set the brightness 0 7 the greater the value the higher the brightness the next display takes effect disp point 0 Turn off the display colon and the next display takes effect disp point 1 Tu...

Page 25: ...ch area you touch refer to the code You can learn about the touch pad control method digital increase reduce clear operation of the digital display 7 2 Upload code for lesson 3 1 Open lesson3 example...

Page 26: ...When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson when you touch TCH1 the number incre...

Page 27: ...efine a object before you use it and some object has parameter For example TM1637 disp 10 11 define a TM1637 object and display connect to D10 D11 of Rich UNO R3 board 4 Two necessary functions Each e...

Page 28: ...zation You should write it in the setup function initialize it and it has set the default brightness to be 3 0 7 number larger brightness higher disp display int Decimal display range 999 9999 If your...

Page 29: ...ou want to display So we can add debounce code to avoid this problem In this lesson you can learn about software debounce method to achieve the number increasing step by step and the step maybe one tw...

Page 30: ...Upload button to upload the code to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you w...

Page 31: ...ime you should define a object before you use it and some object has parameter For example TouchSensor touch 3 4 5 6 define a touch sensor object and display connect to D3 D4 D5 D6 of Rich UNO R3 boar...

Page 32: ...Num disp init initialization You should write it in the setup function initialize it and it has set the default brightness to be 3 0 7 number larger brightness higher disp display int Decimal display...

Page 33: ...125 MCU can read data from its internal registers directly through the I2C bus and operate the 4 data registers to set different operation modes The module can not only measure the temperature but yo...

Page 34: ...see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson you can see it displays the temperature on t...

Page 35: ...bject has parameter and some does not For example TM1637 disp 10 11 define a TM1637 object and display connect to D10 D11 of Rich UNO R3 board LM75 temper define an LM75 object temper for temperature...

Page 36: ...er in the sun so it is often use for watches Clock Induction Cooker In this lesson learn how to use the internal timer method to make the displayed number flash 10 2 Upload code for lesson 6 1 Open le...

Page 37: ...ng congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson you can see it displays 2017 first and when you touch TCH4 it is f...

Page 38: ...object defined in TimerOne h you can use it directly For example TM1637 disp 10 11 define a TM1637 object and display connect to D10 D11 of Rich UNO R3 board 4 Two necessary functions Each example cod...

Page 39: ...UCH_OUT2 touchNum 2 break case TOUCH_OUT3 touchNum 3 break case TOUCH_OUT4 touchNum 4 break default touchNum _pin break return touchNum disp init initialization You should write it in the setup functi...

Page 40: ...ed to control volume of speaker voltage of power and speed of motors In this lesson you can learn get the angle of the knob rotary angle sensor and display on the 4 digit display 11 2 Upload code for...

Page 41: ...hen you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson you can see it displays the angle whe...

Page 42: ...at any time you should define a object before you use it and some object has parameter For example TM1637 disp 10 11 define a TM1637 object and display connect to D10 D11 of Rich UNO R3 board Knob kn...

Page 43: ...brightness of display volume of speaker voltage of power and speed of motors In this lesson you can learn to use the knob rotary angle sensor to control the brightness of the display 12 2 Upload code...

Page 44: ...ode to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson you can see...

Page 45: ...mple TM1637 disp 10 11 define a TM1637 object and display connect to D10 D11 of Rich UNO R3 board Knob knob A0 define a Knob object the signal of knob connect to A0 of Rich UNO R3 4 Two necessary func...

Page 46: ...OPEN SMART Email catalex_inc 163 com 46 disp point 0 Turn off the display colon and the next display takes effect disp point 1 Turn on the display colon and the next display takes effect...

Page 47: ...one In this lesson you can learn to use the touch button to enter the year month day day of week hour minute to initialize the clock module data and you can see whether your setting is ok from the ser...

Page 48: ...atalex_inc 163 com 48 2 Check the Board and Serial Port 3 Click Upload button to upload the code to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the b...

Page 49: ...orresponds to the number increase TCH2 area corresponds to the number decrease TCH3 area corresponds to confirm the number you set OK Button TCH4 area corresponds to make it enter next step next step...

Page 50: ...uch TCH3 to confirm and the serial monitor will tell you what you have just set Again and again then day of month day of week hour minute all the six items have been set the monitor will tell you what...

Page 51: ...onnects to I2C port of Rich UNO R3 4 Two necessary functions Each example code should inclue the two necessary functions void setup void loop Usually we write initialization code in setup function and...

Page 52: ...try to write this function to get 1 2 3 4 for TCHx int get int touchNum int _pin _pin touch get switch _pin case TOUCH_OUT1 touchNum 1 break case TOUCH_OUT2 touchNum 2 break case TOUCH_OUT3 touchNum...

Page 53: ...ock and of course you can use our 2 2 inch TFT shield or 2 8 inch TFT Shield In this lesson you can learn how to get the date and time from DS1307 module and display time on the 4 digit display 14 2 U...

Page 54: ...button to upload the code to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In t...

Page 55: ...oard DS1307 clock define a object of DS1307 class 4 Two necessary functions Each example code should inclue the two necessary functions void setup void loop Usually we write initialization code in set...

Page 56: ...Infrared reception angle is small not susceptible to interference In this lesson you can learn how to get keys code of the buttons on the IR remote and display on the serial monitor of Arduino IDE 15...

Page 57: ...atalex_inc 163 com 57 2 Check the Board and Serial Port 3 Click Upload button to upload the code to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the b...

Page 58: ...n the IR remote the serial monitor will output the user code of the remote and key code of the button So you can get what button has been pressed according to the key code and then do some operations...

Page 59: ...ly we write initialization code in setup function and then write the code what you want the board to do in loop function which runs cyclically 5 Functions IR enableIRIn Start the receiver IR decode if...

Page 60: ...emote control Infrared reception angle is small not susceptible to interference In this lesson how to recoginze the key on the IR remote control and display the number on the display 16 2 Upload code...

Page 61: ...ions you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson only number 0 9 and buttons are valid Every time you press the button the buzzer...

Page 62: ...ct before you use it and some object has parameter For example TM1637 disp 10 11 define a TM1637 object and display connect to D10 D11 of Rich UNO R3 board Buzzer buzzer 9 define Buzzer object it conn...

Page 63: ...ind the 01 and 02 folder and put them into your TF card should not larger than 32GB MP3 and songs are important for us now We may feel happy an relax when we listen to some beautiful music In this les...

Page 64: ...Click Upload button to upload the code to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as...

Page 65: ...s object We have defined the class in the RichUNO library and at any time you should define a object before you use it and some object has parameter For example MP3 mp3 7 8 define the MP3 object and c...

Page 66: ...c usp sharing Then unzip it and find the 01 and 02 folder and put them into your TF card should not larger than 32GB In this lesson you can learn how to play a song with folder name and file name This...

Page 67: ...utton to upload the code to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In th...

Page 68: ...e class in the RichUNO library and at any time you should define a object before you use it and some object has parameter For example MP3 mp3 7 8 define the MP3 object and connect to D7 D8 of Rich UNO...

Page 69: ...find the 01 and 02 folder and put them into your TF card should not larger than 32GB When you play a song you may want to control the volume up and down and the silver knob can help you In this lesso...

Page 70: ...ard When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson you can hear that it plays the s...

Page 71: ...should define a object before you use it and some object has parameter For example Knob knob A0 MP3 mp3 7 8 define the MP3 object and connect to D7 D8 of Rich UNO R3 4 Two necessary functions Each ex...

Page 72: ...g Then unzip it and find the 01 and 02 folder and put them into your TF card should not larger than 32GB In this lesson you can learn how to use the 4 channel touch sensor to control the MP3 such as p...

Page 73: ...When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson you can see it plays a song Yesterda...

Page 74: ...e a object before you use it and some object has parameter For example MP3 mp3 7 8 define the MP3 object and connect to D7 D8 of Rich UNO R3 4 Two necessary functions Each example code should inclue t...

Page 75: ...ng function only can play the next song in 01 folder and if there is only one song in it this operation will play the same song again mp3 previousSong only can play previous song in the same folder li...

Page 76: ...usp sharing Then unzip it and find the 01 and 02 folder and put them into your TF card should not larger than 32GB In this lesson how to use the Infrared remote control to control the MP3 and when you...

Page 77: ...ding congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson you can press 1 to play the first song in the TF card and press...

Page 78: ...nd connect to D7 D8 of Rich UNO R3 4 Two necessary functions Each example code should inclue the two necessary functions void setup void loop Usually we write initialization code in setup function and...

Page 79: ...e receiver IR decode if no result it return 0 otherwise it return 1 IR resume so that it can receive the next value IR isReleased if the button is not released yet it return 1 otherwise it return 0 IR...

Page 80: ...er and put them into your TF card should not larger than 32GB When you want to do wonderful voice broadcast project you should first know the voice resources you have In this lesson you can learn to k...

Page 81: ...congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson firstly you can touch TCH3 to speak the first voice and it displays 1...

Page 82: ...time you should define a object before you use it and some object has parameter For example MP3 mp3 7 8 define the MP3 object and connect to D7 D8 of Rich UNO R3 4 Two necessary functions Each exampl...

Page 83: ...int8_t directory int8_t file play a song according to the folder name and prefix of its file name directory folder name must be 01 02 03 09 10 99 prefix of file name must be 001 009 010 099 disp init...

Page 84: ...folder and put them into your TF card should not larger than 32GB When you want to do wonderful voice broadcast project you should know how to play multiple tone in the order set In this lesson you c...

Page 85: ...rt 3 Click Upload button to upload the code to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is runnin...

Page 86: ...ple MP3 mp3 7 8 define the MP3 object and connect to D7 D8 of Rich UNO R3 4 Two necessary functions Each example code should inclue the two necessary functions void setup void loop Usually we write in...

Page 87: ...2 folder and put them into your TF card should not larger than 32GB In this lesson You can learn how to speak the temperature you get from the temperature sensor according to the value and the filenam...

Page 88: ...load button to upload the code to Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want...

Page 89: ...as parameter For example MP3 mp3 7 8 define the MP3 object and connect to D7 D8 of Rich UNO R3 4 Two necessary functions Each example code should inclue the two necessary functions void setup void loo...

Page 90: ...emperatue get temperature disp init initialization You should write it in the setup function initialize it and it has set the default brightness to be 3 0 7 number larger brightness higher disp displa...

Page 91: ...ng Then unzip it and find the 01 and 02 folder and put them into your TF card should not larger than 32GB In this lesson you can learn how to speak the time you get from the RTC module according to th...

Page 92: ...o Rich UNO R3 board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson you can see it d...

Page 93: ...you use it and some object has parameter For example TM1637 disp 10 11 define a TM1637 object and display connect to D10 D11 of Rich UNO R3 board DS1307 clock define a object of DS1307 class 4 Two nec...

Page 94: ...k hour and clock minute Timer1 initialize unsigned long microseconds set the timed length the unit is microseconds Timer1 attachInterrupt TimingISR set interrupt routine function name is the timing in...

Page 95: ...TF card should not larger than 32GB In this lesson this is integrated project You can learn how to speak the time and temperature you get from the RTC module according to the value and the filename of...

Page 96: ...board When you see that Done uploading congratulations you have upload the code to the board successfully 4 Check whether the board is running as you want In this lesson you can touch TCH1 to hear te...

Page 97: ...Define class object We have defined the class in the RichUNO library and at any time you should define a object before you use it and some object has parameter For example TM1637 disp 10 11 define a T...

Page 98: ...and clock minute Timer1 initialize unsigned long microseconds set the timed length the unit is microseconds Timer1 attachInterrupt TimingISR set interrupt routine function name is the timing interrup...

Page 99: ...com 99 27 Part List Documents download link https drive google com drive folders 0B6uNNXJ2z4CxaXFpakMxR0p1Unc usp sharing OPEN SMART Official Store https open smart aliexpress com store 1199788 Techn...

Reviews: