OPEN-SMART Rich UNO R3 Скачать руководство пользователя страница 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 

 

 

Содержание Rich UNO R3

Страница 1: ...OPEN SMART Name Rich UNO R3 user manual Version v1 0 Date 2017 06 12 OPEN SMART...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Отзывы: