https://www.lairdconnect.com/wireless-
modules/bluetooth-modules
30
© Copyright 2019 Laird. All Rights Reserved
Americas
: +1-800-492-2320
Europe
: +44-1628-858-940
Hong Kong
: +852 2923 0610
Figure 18: LEDs and Buttons schematic and PCB
The buttons (BUTTON1 and BUTTON2, for example) have no external pull-up resistor. To use the buttons, the SIO_11 and
SIO_12 pins must be configured as inputs with internal pull-up resistors (which is the default). The following
smart
BASIC lines
configure the pull-ups:
rc = GPIOSETFUNC(11,1,4)
'//sets SIO_11 (Button1) as a digital in,
strong pull up
rc = GPIOSETFUNC(12,1,4)
'//sets SIO_12 (Button2) as a digital in,
strong pull up
Refer to the
smart
BASIC application script example
btn.button.led.test.sb
in the GitHub
smart
BASIC sample application
repository on the BL654PA product page at
https://github.com/LairdCP/BL654PA-Applications
The LEDs are active high, meaning that writing a logical one (“1”) to the output pin illuminates the LED.
One example of when push buttons can be used is when a
smart
BASIC application is written to simulate a generic data
profile. Push buttons can then be pressed to increment and decrement, such as a heart rate.
SIO_15
SIO_14
SIO_13
SIO_16
PIN HEADER,2.54mm 1X2P
J37
1
1
2
2
LED2
LED4
PIN HEADER,2.54mm 1X2P
J39
1
1
2
2
PIN HEADER,2.54mm 1X2P
J45
1
1
2
2
LED3
LED1
PIN HEADER,2.54mm 1X2P
J26
1
1
2
2
LED3
GND
LED
3
R29
1K
D3
Blue,0603
1
2
LED4
GND
LED
4
D4
Blue,0603
1
2
R31
1K
GND
LED
1
R15
1K
LED1
D1
Blue,0603
1
2
GND
LED
2
R16
1K
LED2
D2
Blue,0603
1
2
BUTTON4
SIO_25
BUTTON3
SIO_24
SIO_11
BUTTON1
SIO_12
BUTTON2
Summary of Contents for 455-00022
Page 1: ...Version 1 0 ...