![]() The transistors used are S8050 NPN low-power, high-current transistors which I had handy, but they are probably not the ideal approach, especially considering that in the end I did not use a resistor at the transistors' bases. ![]() In terms of powering the circuit, since the Chromecast, ATtiny85, and the version of the HC-05 that I have run on 5V, I power them directly from USB, and have the transistors control the connection of the Chromecast to GND, with its VCC always connected. Then, upon receiving the right commands, the ATtiny85 switches power to the Chromecast on or off through some transistors. The main idea is that the ATtiny85 and the HC-05 communicate over serial in order to allow for incoming Bluetooth connections, and to parse incoming messages. This meant that I had to use some sort of microcontroller as well, so I opted for the ATtiny85 instead of a fully-fledged Arduino (even a Nano or Pro Micro), as it is smaller, and with fewer I/O pins. In the end, I opted for the Bluetooth option, which requires physical proximity, as I didn't want to connect the ESP8266 to the local WiFi network. I wanted to create my project based on hardware that I already had available, so the choice was between the HC-05 Bluetooth module and the ESP-01 WiFi module. This is a detailed write-up discussing some of the design decisions, but the code (and the APK binary) can be found on GitHub in case you want to try it out directly for yourself. And because manually turning Bluetooth on, connecting to the Arduino, sending the commands, and then switching Bluetooth back off was not quite as automated as I had hoped, I decided to write a Tasker plugin that would take care of that. I opted for a solution that uses an Arduino Bluetooth module, and receives commands from its paired device to control the state of the power output to the Chromecast. You either need to disconnect the power, or turn off the TV, but I wanted a way to switch it off from my Android phone, since my monitor does not have a remote. Only available for connected and scanned devices.</_array_.RELEVANT_VARIABLES10><_array_.RELEVANT_VARIABLES11>%bt_typeĬould be 'classic', 'le', 'dual' or 'unknown'</_array_.I've recently started using my first-gen Chromecast with my monitor, and my only complaint is that there is no way to turn it off natively. The device's major bluetooth class name</_array_.RELEVANT_VARIABLES8><_array_.RELEVANT_VARIABLES9>%bt_nameīluetooth device's name</_array_.RELEVANT_VARIABLES9><_array_.RELEVANT_VARIABLES10>%bt_signal_strength The device's major bluetooth class ID</_array_.RELEVANT_VARIABLES7><_array_.RELEVANT_VARIABLES8>%bt_major_class_name True if there is at least one encrypted connection to this device, false otherwise</_array_.RELEVANT_VARIABLES6><_array_.RELEVANT_VARIABLES7>%bt_major_class![]() % of battery available, or not set if unavailable. <_array_.RELEVANT_VARIABLES0>%bt_addressīluetooth device's MAC address</_array_.RELEVANT_VARIABLES0><_array_.RELEVANT_VARIABLES1>%bt_battery_levelSo I created a Bluetooth Connection Task as you'd expect but when I execute it, the headphones are still connected.Īny tips on what I should be doing? I've tried matching by MAC address and name to no avail. I want a Task that will disconnect my headphones.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |