Skip to content

Send temperature data via BLE from an Arduino peripheral to a Flutter Android/iOS central.

License

Notifications You must be signed in to change notification settings

d-wolf/flutter_ble_arduino_temperature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BLE Temperature Peripheral + Central

This Project shows how to use Bluetooth® Low Energy (BLE) to send temperature data via the Arduino Nano 33 BLE Sense REV2 (peripheral) to an Android/iOS app (central). The central uses a single code base for both iOS and Android and is developed with the Flutter cross platform framework.

demo.mp4

Setup the Peripheral

  1. Go through the setup guide of the Arduino Nano 33 BLE Sense REV2.
  2. Open the Arduino IDE and add install both ArduinoBLE and Arduino_HS300x. If you are interested in more information about Bluetooth Low Energy and the ArduinoBLE library, check out the link.
  3. Open the peripheral.ino file and hit the upload button.
  4. The peripheral is setup successfully when the serial monitor prints Bluetooth® device active, waiting for connections....

Setup the Central

  1. First setup the crossplattform framework Flutter.
  2. Go to the project folder and run run dart run build_runner build --delete-conflicting-outputs.

The app has two build variants prod and sim. The prod variant connects to a real physical device whereas the sim variant just emulates one. So to run the app you dont really need a physical device at all. Just run the sim variant. To do so call flutter run --release --flavor sim -t lib/main_sim.dart. For the prod variant call flutter run --release --flavor prod -t lib/main_prod.dart.

Run CI

  • git tag v<major>.<minor>.<version>
  • git push origin --tags

Sources