This repository was archived by the owner on Aug 27, 2021. It is now read-only.
forked from aanon4/BlueBasic
-
Notifications
You must be signed in to change notification settings - Fork 2
Example: Lowpower
JBtje edited this page Jun 5, 2015
·
3 revisions
4 //
5 // "Basic low power configuration"
6 //
7 // "Power regulator off when sleeping"
10 CONFIG POWER, 2
13 // "3200 = Advertise every 2 seconds"
15 T = 3200
20 BTPOKE LIM_DISC_ADV_INT_MIN, T
30 BTPOKE LIM_DISC_ADV_INT_MAX, T
40 BTPOKE GEN_DISC_ADV_INT_MIN, T
50 BTPOKE GEN_DISC_ADV_INT_MAX, T
1 // Low power car beacon for "Find My Car Smarter"
2 // https://itunes.apple.com/us/app/find-my-car-smarter-pro/id480619632?mt=8
10 AUTORUN ON
20 ADVERT GENERAL
30 ADVERT NAME "Honda"
40 ADVERT END
50 T = 3200
60 BTPOKE LIM_DISC_ADV_INT_MIN, T
70 BTPOKE LIM_DISC_ADV_INT_MAX, T
80 BTPOKE GEN_DISC_ADV_INT_MIN, T
90 BTPOKE GEN_DISC_ADV_INT_MAX, T
100 BTPOKE TXPOWER, -23
110 CONFIG POWER, 2
more info here
FOR
IF
GOSUB
DIM
LIST
MEM -
NEW
RUN
END
GOTO
REM
PRINT
REBOOT
RETURN
AUTORUN
CONFIG -
ABS
LEN !
RND
+
-
*
/
%
&
|
^
>
>=
<
<=
=
==
!=
<<
>>
//
TIMER
MILLIS -
DELAY
PINMODE
RISING -
FALLING -
INTERRUPT -
ATTACH -
DETACH -
SERIAL
SPI
ANALOG
I2C
WIRE
TIMEOUT -
WAIT -
PULSE -
BATTERY
GATT
WRITENORSP -
NOTIFY -
INDICATE -
GATT ONREAD -
GATT ONWRITE -
GATT ONCONNECT
GATT ONDISCOVER -
ADVERT
SCAN
ACTIVE -
DUPLICATES -
BTPOKE
BTPEEK