For some time i have been annoyed by the amount of different remote controls needed to control various things at home. So i decided to minimize the needed interfaces to one, my Android is always with me so why not use it to do all at home.
Using the nice APP inventor tool from google i created a Application to provide myself with the customized remote interface. http://appinventor.mit.edu/
I simply send various values to the Arduino true Bluetooth initiating different actions. I am now enabled to control my RF 433Mhz controlled lights and the various infra-red sources i have such as TV, AV receiver, BD player and so on. Luckily my TV supports some feature named Aquos Link, it sends signals to other sources true the HDMI cables. My Sony PS3 reacts to those signals so i can remote control it. If i was missing this functionality i would connect over a USB cable to the PS3 and control it that way instead. The Bluetooth connection direct to the PS3 is not possible as SONY has locked the accepted device ID that are allowed to connect to it apparently.
I decode existing infra-red remote controls using the Infrared remote library from Ken Sherriff. Naturally i use his great library to send infra-red signals as well. https://github.com/shirriff/Arduino-IRremote
For RF control i use another nice library, Home Easy. Again i decode the RF remote controls i want to simulate and then imitate their signal you may say. http://www.arduino.cc/playground/Code/HomeEasy
Video of this in action:
What you see is the project box, from left, USB interface and power cable, RF antenna for sender and receiver and at the end to the right two infra-red receiver diodes. At the inside of the black project box you find a Arduino Uno, Seedstudio Bluetooth Bee and Xbee Shield and RF 433Mhz TX/RX units.
I did a search but could not find the answer, probably due to me using the wrong terminology.
Searching for a way to split a hexadecimal byte array into two parts. Let´s say i have the hexadecimal byte as stated below in a array. DataByte[0] = 0xB5
How do i separate the byte into two parts, DataParts[0] = 0xB DataParts[1] = 0x5
//Set memory to read sms from, ME = phone memory Serial.println("AT+CPMS=\"ME\"");
}
void loop() {
delay(3000); //Read received message Serial.println("AT+CMGR=1");
delay(3000); //Delete all read messages Serial.println("AT+CMGD=1");
// read phone reply if available if (Serial.available() > 0) { incomingByte = Serial.read(), BYTE; // say what you got: Serial.println(incomingByte); }
Well, after testing my self i can now confirm that PWM on pin 5 and 6 works fine when running the virtual wire library. But pin 9 and 10 will not do so at all.
It seems as the virtual wire library in some way changes the TIMER1 settings and basically the PWM signal for pin 9 and 10 is effected. But i have not tested to change pins yet as my application is build in and i need to do some work to reach the pins. So if anyone can confirm my thought it would be great. My only hope is that other PWM pins will not be effected.
After some searching outside the forum i found that some PWM pins need the TIMER1 function to run. And according to my understanding pin 9 and 10 are the ones on Arduino that are using the TIMER1, is that correct?
I am running the Diecimila board with both TX and RX connected to it, all communication works fine both ways. But when i try to run a PWM signal with the command analogWrite on pin 9 something in the virtualwire code is preventing me. I have managed to find that when i un-comment vw_setup(2000) PWM signal works just fine. Anybody had this issue or knows of a solution?
Default IO pins appointed for the Virtual Wire are 12, 11 and 10 so pin 9 should not be effected ?
Could anybody give me a hint on how to solve this. Below you can find the virtual vire code for RX. I am reciving the message "hello 6" and trying to do something when buf[6] is equal to 6. Could it be that i am not converting the value so it can be compared? When i serial print the buf[6] it prints 6 but when i compare it in the "if" code it does not see it as a 6.
Code:
#include <VirtualWire.h>
#undef int #undef abs #undef double #undef float #undef round
void setup() { Serial.begin(9600); Serial.println("setup"); vw_setup(2000); // Bits per sec vw_rx_start(); // Start the receiver PLL running }
When a search is completed and you select one posting out of several it is not possible to return to the search result. Doing the search again more then 5 times is not really user friendly. A great forum without a good search function is sad . Possible to improve the forum or am i missing something?