2018年3月20日 星期二
Make Raspberry pi as a Bluetooth Peripheral Device
install nodejs npm
sudo apt-get install nodejs npm
install nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
source ~/.bashrc
nvm install stable
install bleno
npm install bleno
example code…
http://www.skyrise.tech/blog/tech/bluetooth-raspberry-pi-bleno-part-1-ibeacon/
https://github.com/noble/bleno/blob/master/test.js
run…
node app.js
run BLE App @ ur phone
what's next ?
訂閱:
文章 (Atom)
更高效處理 micro second 的方式
更高效處理 micro second 的方式… 以 STM32 為例… __IO unsigned long sys_tick = 0; void SysTick_Handler(void) { HAL_IncTick(); sys_tick += (SysTi...
-
rails blog -d mysql 建立一個名為 blog 的網站app,使用 mysql cd blog 進去 gen 好的網站 config/database.yml 編輯資料庫設定 rake db:create 自動建立資料庫 ruby script/generate ...
-
https://github.com/ljean/modbus-tk/ install pip… sudo apt-get install python-pip install... download modbus_tk-x.x.x.tar.gz tar zxvf...
-
DMX protocol… # 1:break + 1:start + 512:channel python: import serial class DMX512: def __init__(self, port): self.seria...