Close

Control a Pi with Bluetooth Low Energy

A project log for PiSugar Battery for Raspberry Pi zero

Portable Power Platform for Pi Zero

jdaieJdaie 04/19/2019 at 10:060 Comments

Sometimes connecting a pi zero to a wifi is troublesome. Since there are many ways to do it, but you just don't get a card reader, monitor, keyboard or a laptop along with you.

I think this project, PiSugar aims to make a pi easier to play with, therefore we were trying to find a efficient way to control a pi. Bluetooth low energy (BLE) is a good way you cannot miss. 

Here are some features of BLE:

At the very beginning I was making this just to solve the wifi problem. However, I think it can be more than that. It's actually a complete channel to transport data. If you can custom the characteristics, then you can make your own wireless pi controller. For example, you can safely shutdown the pi, get cpu load, temperature, etc. If you are building a pi car, you can control it through BLE, too.

Miniapp to control the pi via BLE, you can customize what to display, what command to send on the pi

Base on these, we had developed a BLE sevice on pi. From the service you can:

I choose Wechat miniapp to make the client app since Wechat is very common used in China and it's really fast to build a miniapp. People don't have to download native apps. They open miniapp directly in Wechat. Also, miniapp can access to bluetooth. I'm not sure whether Google instant app can access bluetooth. But even if it can, maybe it's just for Android? So I'm still considering whether I should build native ios / android app.

Link: https://github.com/PiSugar/sugar-wifi-conf

Discussions