EasyManuals Logo

Microchip Technology RN4870 User Manual

Microchip Technology RN4870
65 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #50 background imageLoading...
Page #50 background image
RN4870/71 Bluetooth
®
Low Energy Module User’s Guide
DS50002466A-page 50 2016 Microchip Technology Inc.
3.1.3 Comments
RN4870/71 script engine handles the script line by line. Each line starts with multiple
spaces or tabs and ends with return or line feed. Even though space is generally
prohibited within a command, spaces or tabs are allowed in assignments and logic
expressions.
Comment lines can be added to the script. Comment line starts with letter “#” and lasts
the whole line. The script engine completely ignores the comment line and jump to the
next script line once a comment line is detected.
The following script line is treated as a comment:
3.1.4
Variables
RN4870/71 script engine defines two variables: $VAR1 and $VAR2. Variable names are
case sensitive. The value of the variables can be assigned to a constant value, or a
value that is returned by an ASCII command. For instance, following script line assigns
value 0x1234 to variable $VAR1:
Similarly, following script line assigns the reading of the analog channel 0 to variable
$VAR2:
After assigning a value, variables can be used in an ASCII command. For instance, fol-
lowing ASCII command assigns value of variable $VAR1 to the server characteristic
handle 0x0019.
The range of variables can be defined so that if the value of the variables is not in the
defined range, corresponding ASCII commands with variables do not prosecute.
The range of variable can be a single condition such as the following script line which
defines variable $VAR1 must be larger than 0x0100.
Disconnected @DISCON
Trigger Pin 1 Rising Edge @PIO1H
Trigger Pin 1 Falling Edge @PIO1L
Trigger Pin 2 Rising Edge @PIO2H
Trigger Pin 2 Falling Edge @PIO2L
Trigger Pin 3 Rising Edge @PIO3H
Trigger Pin 3 Falling Edge @PIO3L
# This is an example of comment line
$VAR1 = "1234"
$VAR2 = @,0
SHW,0019,$VAR1
$VAR1 > "0100"
TABLE 3-1: LIST OF EVENTS AND EVENT LABELS (CONTINUED)
Event Event Label

Other manuals for Microchip Technology RN4870

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Microchip Technology RN4870 and is the answer not in the manual?

Microchip Technology RN4870 Specifications

General IconGeneral
BrandMicrochip Technology
ModelRN4870
CategoryMotherboard
LanguageEnglish

Related product manuals