I'm trying to use the new radiohead library to drive those cheap one-way transmit receive modules, I am having some funny serial reads.
the code states that it's sending hello, but instead on the receiving end it reads
Got:
68 65 6C 6C 6F
I'm hoping to figure out how to send variables , for example joystick data and multiple buttons, as commanded. I'm sure it works if you're advanced enough, but I can't see what's wrong in the demo....
If you do not store the received value in a char variable, then the VALUE is what will be printed. If you store the value in a char variable, and then print the char variable, a letter will be printed.
I'm hoping to figure out how to send variables
Saw off the part of the chip that contains the memory address where the data is, and put that in an envelope.
If you meant that you want to send the stored in a variable, that's a different story, and is quite easy to do.
but I can't see what's wrong in the demo....
Well, we can't see your code, so it looks like you are up a creak without a paddle.
I'm working on understanding how to send the data,, I am reading some codes that are sending floats and receiving chars (as in charred,, standing for character, as in care), but I will need to break the chars into multiple ints. I don't see anyone making ints, just displaying chars. I want to wind up with an int on the receiving end. (actually several, because I want to make like a joystick remote, with 3 pot values and a few button values.)
basically I'm reading codes using the virtual wire library, and from youtube videos, but it should be "compatible".
the sample is the basic examples in the library download,, I could paste them but it would be a lot of forum space, and they are probably a must have library. those transmitters are 10 dollars for a 5 pack(pairs). Unos are 10 bucks also.
anyway, here's the whole loop in the code receive code,, (lots of library in this code). So I guess it must be working perfectly, because it says nowhere to display a "char"
void loop()
{
uint8_t buf[RH_ASK_MAX_MESSAGE_LEN];
uint8_t buflen = sizeof(buf);
if (driver.recv(buf, &buflen)) // Non-blocking
{
int i;
// Message with a good checksum received, dump it.
driver.printBuffer("Got:", buf, buflen);
}
}