
https://www.sparkfun.com/products/10532
https://www.sparkfun.com/products/10534
Since there are very few libraries that support Attiny85, I had to create my own transmitter and receiver code. They are extremely minimalistic, but they work pretty well! Basically the transmitter code consists of a function called byteSend() . What it does is chop up a letter that is typed into it, into bits and send the bits through the transmitter one at a time. For now, I can only send one byte at a time, so in order to create a sentence I have to create many byteSend() functions.The Receiver does the opposite of the transmitter, it collects the the bits and packs them into a byte in order to send them over the Serial Monitor.

Despite the fact that transmitting letters works with my code, I eventually want to transmit temperature readings from the analog pin on the Attiny85. For this I have to convert the analog reading which is an Int, into a byte, so I can send it via the Transmitter. I tried to send one digit ints through the link but I believe they consist of two bytes so that's probably the reason why It didn't work. Here is how I did it.

Code:
int d = 7;
byteSend(d);
byteSend(d);
Is there a way to convert the int into a byte that the function will be able to send?

Thanks guys.

Here is the transmitter code:
Code:
// Data pin that connects to the transimter's DATA IN pin
int dataPin = 2;
void setup(){
// Set up the Data pin as an Output
pinMode(dataPin, OUTPUT);
}
void loop(){
// Send some bytes continuesly
byteSend('T');
byteSend('E');
byteSend('S');
byteSend('T');
byteSend('#');
delay(10);
}
// Function that will simplify the process of sending a letter
void byteSend (byte inputByte){
int i;
// Loop that will make the reciever wake up and adjust its amplification
for(i=0; i<20; i++){
digitalWrite(dataPin, HIGH);
delayMicroseconds(50);
digitalWrite(dataPin, LOW);
delayMicroseconds(50);
}
// A 3ms delay in order to synch the transimtter and get ready for data transmition
digitalWrite(dataPin, HIGH);
delayMicroseconds(3000);
digitalWrite(dataPin, LOW);
delayMicroseconds(500);
// A loop that goes throught all the bits in a byte and transimts accordingly
for(i=0; i<8; i++){
if (bitRead(inputByte,i)==1) {
digitalWrite(dataPin, HIGH);
delayMicroseconds(1000);
}
if (bitRead(inputByte,i)==0) {
digitalWrite(dataPin, LOW);
delayMicroseconds(1000);
}

But what I meant in my code is reading the value of a button that is on a specific X Y coordinate. A 2D array must be used for this to work.