In the last installment, we managed to get the Pi to talk over BLE to the atMega, and for the atMega to turn on an LED to show that this had happened. While interesting, this on its own is of no use. We want to get a response back, too. Simply trying to use the readCharacteristic() function failed. Further investigation is needed. After searching, it appears that the issue is that bluepy is not queueing th information coming back. In fact, it has a mechanism for such issues. Python has objects, and bluesy uses them. We created lawn as one of these objects–but that’s not enough. We need to assign…
-
-
Talking to the atMega from the Pi over Bluetooth BLE
Past posts have built an atMega328p nano board with bluetooth BLE and a DHT22 sensor, and also a quick peek at Python on a Raspberry Pi 0w. Now it’s time to combine them. Make sure your Pi is up to date if you haven’t already: sudo apt-get upgradesudo apt-get dist-upgrade And make sure that you have the bluez libraries and the python : sudo apt-get instal blues pi-bluetooth It appears that as of this writing (the end of 2018), all of the services needed for BLE are now included by default, and that it is not necessary to manually add support for experimental portions Use ssh to connect to your…
-
Starting with Python on Raspberry Pi
I’ve programmed in many languages over the years. So many, in fact, that I’d be hard pressed to name them all, and unlikely to succeed. One of the things that I’ve learned in the process is that most of them are easy to pick up: just find a small working program or three for reference, a reference manual, and start writing. As you start understanding the very basics, only then is it time to look at rules, tutorials, and such (and I recognize that other people will very well learn in a different manner). As I’m playing with Pis, I’m picking up python for no real reason other than that…
-
Starting With a Raspberry Pi Zero W
While there are steps with the atMega waiting to be posted, let’s turn attention briefly to the Raspberry Pi. In particular, I have a Zero WH–the small one with wireless built in, and the headers pre-soldered by Adafruit. (OK, I have a couple more, as you might have expected, but that’s not the point today.). The atMegas are plenty for the deployments about the yard, but have rather limited storage. I want to have logs, and give direction to the little circuits, so more power–or at east more storage–is needed. The Pi Zero W has a 1ghz single core CPU, 512mb ram, and built in bluetooth ad wifi. I’ve added…