Page 57 - ArduinoและPOP-BOT
P. 57

 57


               4.12 คํ าสงวนของ Arduino


                       คํ าสงวนคื อ ค าคงที่  ตั วแปร และฟ งก ชั่ นที่ ได กํ าหนดไว เป นส วนหนึ่ งของภาษา C ของ Arduino ห ามนํ า
               คํ าเหล านี้ ไปตั้ งชื่ อตั วแปร สามารถแสดงได ดั งนี้


               # Constants             # Datatypes             //                      PII
                                                               ?:                      return
               HIGH                    boolean
                                                               constrain               >>
               LOW                     byte
                                                               cos                     ;
               INPUT                   char
                                                               {}                      Serial
               OUTPUT                  class                   —                       Setup
               SERIAL                  default                 default                 sin
               DISPLAY                 do                      delay                   sq
               PI                      double                  delayMicroseconds       sqrt
               HALF_PI                 int                     /                       - =
               TWO_PI                  long                    /**                     switch
               LSBFIRST                private                 .                       tan
               MSBFIRST                protected               else                    this
               CHANGE                  public                  ==                      true
               FALLING                 return                  exp                     TWO_PI
                                                               false                   void
               RISING                  short
                                                               float                   while
               false                   signed
                                                               float                   Serial
               true                    static
                                                               floor                   begin
               null                    switch
                                                               for                     read
                                       throw                   <                       print
               # Port Constants
                                       try                     <=                      write
               DDRB                    unsigned                HALF_PI                 println
               PINB                    void                    if                      available
               PORTB                                           ++                      digitalWrite
               DDRC                                            !=                      digitalRead
                                       # Other
               PINC                                            int                     pinMode
                                       abs
               PORTC                                           <<                      analogRead
                                       acos
               DDRD                                            <                       analogWrite
                                       +=
               PIND                                            <=                      attachInterrupts
                                       +
               PORTD                                           log                     detachInterrupts
                                       []
                                                               &&                      beginSerial
                                       asin
                                                               !                       serialWrite
                                       =
                                                               ||                      serialRead
                                       atan
                                                               ^                       serialAvailable
                                       atan2
                                                               ^=                      printString
                                       &
                                                               loop                    printInteger
                                       &=
                                                               max                     printByte
                                       |
                                                               millis                  printHex
                                       |=
                                                               min                     printOctal
                                       boolean
                                                               -                       printBinary
                                       byte
                                                               %                       printNewline
                                       case
                                                               /*                      pulseIn
                                       ceil
                                                               *                       shiftOut
                                       char
                                                               new
                                       char
                                                               null
                                       class
                                                               ()
                                       ,
   52   53   54   55   56   57   58   59   60   61   62