Disclaimer and Social

This page may contain affiliate links. As an Amazon Associate I earn from qualifying purchases.

Showing posts with label BLE. Show all posts
Showing posts with label BLE. Show all posts

Wednesday, January 17, 2018

Weather Station Might Need Some Rework

I'm thinking this might be a good time to rework the interface for my DIY Bluetooth weather station. Sure, I can tell a lot about the precipitation and wind just by looking at the station, but it's not sending any useful data to the display.

It might be time to bring the weather station inside so I can manually control the physical inputs. It's too cold to be outside and it's always fun to sit in the living room madly twisting, spinning, blowing and shaking a large plastic porcupine of sensors while looking at quickly moving, squiggly lines on my phone..

Weather stations in winter can be a bit unreliable. My "rain gauge" reads zero, but I'm pretty sure there has been some precipitation recently just from looking. I might bring it inside and work on the graphic display of the Bluetooth receiver.

I'm not looking forward to coding again, at least not this project. It works now, works very well in fact. But from what I remember I wrote some good, tight code - then got excited and went on an experimental streak. So there is probably lots of orphaned threads and poorly conceived routines wrapped around the well written, well documented portion of the program.

However, after a few months of successful testing with a Bluetooth data stream, I realize that I need to use another communication protocol with a longer range (probably LORA) so I can get the weather station into an area where the wind and rain won't be affected by surrounding structures. With Bluetooth I can only get 40-50 feet away from the house. But with LORA I could easily get 250 feet. That's enough to get the sensors out into an unobstructed area.

The station and my DIY display works well enough to give me a reasonable idea of what's going on and a basic record of overnight activity. But I also want to add a few more capabilities and display features.

If I do actually work on the display I'll try to document the process this time. It's actually pretty cool and fun to play with - plus it uses some basic interface techniques I've re-used several times. The real problem with blogging about it is that there is Android code, Arduino code, interface concerns, data storage and translation and .... well you get the picture. There's a lot going on.

But maybe if I write about each part as it happens I won't get bogged down in trying to create one huge, master tutorial. At the very least, I'll post some pics of the interface.


Also find me on: FACEBOOK 




Wednesday, November 15, 2017

Connecting App Inventor and Bluetooth Low Energy



Finally found a great tutorial on using Bluetooth Low Energy (BLE) with MIT's App Inventor for Android. The guide is well written with lots of details on the connection process. This isn't surprising since (I think) the author is one of the people who created the BLE extension for App Inventor.

Check out the tutorial at Hackster.io

I've been using App Inventor with Bluetooth classic for a while now and am comfortable shipping data to and from several versions of Bluetooth modules. But the new BLE extension for App Inventor looked like it was a lot more complex to use, so I had avoided it until now. I still don't understand what all the extension's functions do, but the tutorial allowed me to get connected and communicating in just a few minutes.




Got a basic interface created and it's talking to the Feather board well enough to control color, speed and direction

The tutorial uses Adafruit's BLE Feather. The Feather line of boards is one of my favorite IOT platforms. It's a small but powerful Arduino compatible board, and there is a wide range of add-on shields for it. There are shields for controlling motors, LEDs, graphic displays etc. Adafruit also has BLE breakouts for adding to other boards.

And they already have free apps for both Android and  iOS for communicating with the BLE version of the Feather board. The apps are powerful and easy to use, but I wanted to create some custom functionality.My first project is to create an interface to give me more control over the Feather NeoPixel shield. This will come as no surprise to most of you - I always start learning new platforms with NeoPixels.








I'm not ready to talk much about the project yet. It's functioning and stable, but it's awkward to use. It's also a lot more complex than most of my Android projects, so I'm forced to get back into the whole UI/UX thing for the first time in years. Giving all those cues to the user is taking up a lot of my coding time, maybe more than the basic functionality.

In fact, I will probably have to break down the (soon to be released) tutorial into multiple steps - connecting, tracking settings, packaging data and UI manipulation - for both the Android side and Arduino side of things.

I'm telling myself all this work is worth it because I will finally have a full stack of parts that will allow me to create both household and wearable items that can be controlled over a phone by a non-techie. Stay tuned...


Also find me on: FACEBOOK