Category

Chinese

Created by

Hunter Chiou & Andreas Dreier

Name

Chinese1

Uploaded

22.08.2008

 

Download

Content of ZIP file

  Chinese1.ric            

1

1

3

  Chinese1.nxc                  
  Chinese1.inc                  

 

Description

This RIC file is the result of a very close work between Hunter Chiou from Taiwan and myself for enabling to displaying Chinese patterns on the NXT screen.

 

Hunter Chiou was born in the year 1968 and is currently living in Tawain. He is a mechanical engineer and is teaching children with LEGO educational products in after school class. You can find some interesting stuff on his homepage: http://tw.myblog.yahoo.com/touch_classroom/

 

The download file contains the RIC file, an example program and last but not least the include file which can be reused for your own applications. The include file contains the definition of constants and also a output function which can be used for displaying the Chinese patterns.

 

The following output patterns are defined within the file Chinese1.inc and can be used:

 

  NXC constant Output  
 

chinese_0

0

 
 

chinese_1

1

 
 

chinese_2

2

 
 

chinese_3

3

 
 

chinese_4

4

 
 

chinese_5

5

 
 

chinese_6

6

 
 

chinese_7

7

 
 

chinese_8

8

 
 

chinese_9

9

 
 

chinese_port_a

[A]

 
 

chinese_port_b

[B]

 
 

chinese_port_c

[C]

 
 

chinese_port_usb

[USB]

 
 

chinese_port_1

[1]

 
 

chinese_port_2

[2]

 
 

chinese_port_3

[3]

 
 

chinese_port_4

[4]

 
 

chinese_nxt

NXT

 
 

chinese_dot

 
 

chinese_comma

 
 

chinese_exclamation

 
 

chinese_motor

馬達

 
 

chinese_sensor

感應器

 
 

chinese_touch_sensor

觸碰感應器

 
 

chinese_light_sensor

光源感應器

 
 

chinese_sound_sensor

聲音感應器

 
 

chinese_ultrasonic_sensor

超音波感應器

 
 

chinese_compass_sensor

羅盤感應器

 
 

chinese_input_port

輸入埠

 
 

chinese_output_port

輸出埠

 
 

chinese_port

 
 

chinese_turn_on

開啟

 
 

chinese_turn_off

關閉

 
 

chinese_bluetooth

藍牙

 
 

chinese_cable

電線

 
 

chinese_display

顯示

 
 

chinese_up

 
 

chinese_down

 
 

chinese_left

 
 

chinese_right

 
 

chinese_enter_key

確定鍵

 
 

chinese_escape_key

脫逃鍵

 
 

chinese_return_key

返回鍵

 
 

chinese_key

 
 

chinese_yes

 
 

chinese_no

 
 

chinese_cancel

取消

 
 

chinese_start

開始

 
 

chinese_stop

停止

 
 

chinese_value

數值

 
 

chinese_volume

音量

 
 

chinese_distance

距離

 
 

chinese_speed

速度

 
 

chinese_power

馬力

 
 

chinese_centimeter

公分

 
 

chinese_inch

英吋

 
 

chinese_pressed

壓下

 
 

chinese_released

放開

 
 

chinese_bumped

壓放

 
 

chinese_bright

 
 

chinese_dark

 
 

chinese_long

 
 

chinese_short

 
 

chinese_big

 
 

chinese_small

 
 

chinese_high

 
 

chinese_low

 
 

chinese_strong

 
 

chinese_weak

 
 

chinese_fast

 
 

chinese_slow

 
 

chinese_red

紅色

 
 

chinese_yellow

黃色

 
 

chinese_blue

藍色

 
 

chinese_green

綠色

 
 

chinese_gray

灰色

 
 

chinese_black

黑色

 
 

chinese_white

白色

 
 

chinese_ate

 
 

chinese_turn_right

向右

 
 

chinese_turn_left

向左

 
 

chinese_turn_back

迴轉

 
 

chinese_unlimited

無限

 
 

chinese_rotation

 
 

chinese_degree

 
 

chinese_second

 
 

chinese_clockwise

順時針

 
 

chinese_counterclockwise

逆時針

 
 

chinese_score

得分

 
 

chinese_points

 
 

chinese_fire

發射

 
 

chinese_music

音樂

 
 

chinese_file

檔案

 
 

chinese_insert

插入

 
 

chinese_machine

機器

 
 

chinese_robot

機器人

 
 

chinese_car

汽車

 
 

chinese_battery

電池

 
 

chinese_good_bye

再見

 
 

chinese_good_morning

早安

 
 

chinese_how_are_you

你好嗎?

 
 

chinese_sorry

抱歉

 
 

chinese_good

 
 

chinese_well_done

很好

 
 

chinese_watch_out

注意

 
 

chinese_warning

警告

 
 

chinese_this

這個

 
  chinese_that 那個  
 

chinese_is

 
  chinese_you  
 

chinese_me

 

 

Every Chinese pattern is defined within a box of 16 x 16 pixels (15x15 will be used). Therefore you can display up to 4 lines with 6 Chinese patterns each line. Please keep in mind that the defined constants can include up to 6 patterns which will be displayed with a single call of ChineseOut( ) procedure!

 

For better positioning of the Chinese patterns you can use the following constants:

 

 

NXC constant

horizontal position

 

 

chinese_LCD_POS1 0

 

 

chinese_LCD_POS2 16

 

 

chinese_LCD_POS3 32

 

 

chinese_LCD_POS4 48

 

 

chinese_LCD_POS5 64

 

 

chinese_LCD_POS6 80

 

       
 

NXC constant

vertical position

 
  chinese_LCD_LINE1 48  
  chinese_LCD_LINE2 32  
  chinese_LCD_LINE3 16  
  chinese_LCD_LINE4 0  

 

Here is a little example which should show you the usage of the RIC file with the Chinese patterns:

 

  #include "Chinese1.inc"


task main()
{
    ClearScreen();

    ChineseOut( chinese_LCD_POS1, chinese_LCD_LINE1, chinese_good_morning );

    ChineseOut( chinese_LCD_POS1, chinese_LCD_LINE2, chinese_how_are_you );

    ChineseOut( chinese_LCD_POS1, chinese_LCD_LINE3, chinese_start );
    ChineseOut( chinese_LCD_POS3, chinese_LCD_LINE3, chinese_robot );

    ChineseOut( chinese_LCD_POS1, chinese_LCD_LINE4, chinese_pressed );
    ChineseOut( chinese_LCD_POS3, chinese_LCD_LINE4, chinese_enter_key );

    while( ! ButtonPressed( BTNCENTER, TRUE ) )
        ;
}
 

 

And the result look like this:

 

 

Don't hesitate to take in contact with we if you have any suggestion for extending the RIC file with new Chinese patterns ;-)