onlinerenta.blogg.se

Mac app for chromecast and bluetooth
Mac app for chromecast and bluetooth






  1. #Mac app for chromecast and bluetooth apk
  2. #Mac app for chromecast and bluetooth serial
  3. #Mac app for chromecast and bluetooth android
  4. #Mac app for chromecast and bluetooth pro
  5. #Mac app for chromecast and bluetooth code

#Mac app for chromecast and bluetooth android

One option would be to use SL4A, but the project seems abandoned, and is likely incompatible with Android Marshmallow. Instead, I liked the idea of completing the entire task through Tasker, which I already use for automation, and which can readily perform the majority of the steps mentioned above.

mac app for chromecast and bluetooth

This was a good start, but not nearly as automated as I wanted, so I decided to come up with a better solution.Īt first, I thought of writing a standalone app, but it wouldn't be as useful in the long-run, as it would have limited functionality. Once I had paired my phone and the Bluetooth module, I found myself repeating the following sequence of actions a lot: turn on Bluetooth, open Bluetooth Terminal or a similar app, connect to the device, send the message, and turn Bluetooth back off.

mac app for chromecast and bluetooth

As a side-note, in case you want to program the ATtiny85 using an Arduino UNO, then this is a good tutorial to get you started.

#Mac app for chromecast and bluetooth code

As a result, I ended up burning the Arduino bootloader on the ATtiny85, as it made the code more portable, and allowed direct use of the SoftwareSerial library. I completed the first version of the program on an Arduino UNO, and then moved it to the ATtiny85 once I was almost done, with the code already debugged. SerialCommand and Bluetooth_HC05) both because I did not require extensive functionality, and because I wanted to minimize the footprint on the ATtiny85, which has only 1/4-th of the ATmega328p Flash and SRAM size. I decided against using external libraries (e.g. Afterwards, the ATtiny85 just parses incoming messages over Bluetooth and sets the transistor pin signal to HIGH or LOW upon receiving the appropriate "on" or "off" message. The reasons for initiating the discovery are not entirely clear to me, but I believe that this is how the module becomes discoverable, as it would otherwise not accept incoming connections or pair with devices.

#Mac app for chromecast and bluetooth serial

Then it initializes the Serial Port Profile (SPP), and initiates device inquiry, which it immediately cancels, since it does not connect to devices directly, but rather has other devices connect to it. On boot, the ATtiny85 sends commands (with some intermediate delay) for resetting the HC-05 to its factory settings, and then changes the module's name and pairing PIN code/password. The code itself is pretty straightforward, since the HC-05 communicates with the ATtiny85 over a simple serial connection using AT commands. Of course, having isolation between this circuit and the Chromecast would be ideal, but I didn't have any optocouplers, and didn't want to power the circuit separately. I placed three of them in parallel, controlled via two ATtiny85 pins (so as not to exceed the 40mA per pin limit), so they should be good for up to about a 2A load. 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.

mac app for chromecast and bluetooth mac app for chromecast and bluetooth

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.

#Mac app for chromecast and bluetooth pro

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.

#Mac app for chromecast and bluetooth apk

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. 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.








Mac app for chromecast and bluetooth