Adafruit RF Programming

Hey All,

I'm super new to electronics -- meaning this is the 1st thing I've ever done. I've programmed some things in the past so coding isn't completely foreign to me. I was looking for some help though.

So these are the parts I have:

Adafruit Feather M0 - Adafruit Feather 32u4 with RFM69HCW Packet Radio - 433MHz [RadioFruit] : ID 3077 : $24.95 : Adafruit Industries, Unique & fun DIY electronics and kits
RF Remote - Robot or human?
Micro Servo - Micro servo : ID 169 : $5.95 : Adafruit Industries, Unique & fun DIY electronics and kits

I'm trying to figure out how to code the board to know when button A is pressed to turn the servo to 0 degrees, when button B is pressed turn to 45 degrees, and when C is pressed turn to 90 degrees.

I see on the adafruit page it gives a "basic" receiver code so I'm assuming I need that -- or some form of it. However I don't know how to tell what the board is reading when it gets a signal from button A, B, or C.

Any help is greatly appreciated. Thanks!

  • WittBitt

Doesn't the Adafruit code include an example that will "dump" incoming data so you can decipher it? I don't see any link to a receiver above. What is your receiver?

aarg:
Doesn't the Adafruit code include an example that will "dump" incoming data so you can decipher it?

I think so, but I'm not 100% sure on how it works. I need to mess around with it more. Apologies for what might end up being a stupid question.

aarg:
I don't see any link to a receiver above. What is your receiver?

My understanding is that the board has a receiver built into it. I have some wire cut to 6.5in to act as an antenna.

You will have to configure the RadioHead library for the ASK signal from the key fob. Using the receiver that way is possible, but non-standard.

Long story short, I'm working on a project where I need to send a signal from a remote to a board to turn a servo to a certain point. I purchased the remote below from Walmart for a few bucks but I don't know if my board isn't receiving anything because my code is wrong (which is very possible due to the fact I've never done anything like this before) or because they're not compatible. So before I go looking into creating my own remote I figured I would check with the powers that be to see if they're compatible.

My products are as follows:

Adafruit Feather M0

RF Remote

Thank you in advance!

Attach Your code using codetags </>.
Also attache a simple diagram showing how You power the stuff, and the connections between them. Don't use links for downloading.

So now you're asking the same question, as if you never did before?
https://forum.arduino.cc/index.php?topic=665760.0

aarg:
So now you're asking the same question, as if you never did before?
Adafruit RF Programming - Project Guidance - Arduino Forum

My apologies. I misunderstood your comment on that thread. I meant no offense by posting a similar question here.

That being said, while I understand now that it's possible to force it to work, I haven't the foggiest idea how to do that. I found this: RadioHead: RH_ASK Class Reference. I feel like that's a start anyway. However, for someone who has no experience with this, would it make more sense to find, or seemingly build, a remote to match the signal that the board understands?

Not really. If you don't understand how to interface the Walmart remote, manufacturing your own isn't going to be any easier. Multiple threads posted on the same topic are bad because people reading them don't have the benefit of seeing solutions and issues that are posted on the other threads. It wastes peoples time.

aarg:
Not really. If you don't understand how to interface the Walmart remote, manufacturing your own isn't going to be any easier.

So help me understand. I'd like to learn but I don't know what to do. Your comment here just basically says, to me, that I should give up.

Where should I start? I really want to make this work but I need help. Which is why I came to this forum to begin with.

Sure. But it's hard to help someone on a forum alone because of the depth and extent of the subject matter. You have to do some basic research, and present questions that revolve around specific issues that you find. So the first stop for you, is all the documentation that you can find on the equipment. It's not just a beginner thing, it's what all successful developers have to do. Even after many years...

Have you seen this?

Also, it's not entirely inappropriate to say, "give up", because some projects are just too complicated for a beginner level developer. But it is more appropriate to suggest working through a large number of easier projects first. It's like math - you can't just jump into Calculus.

The RadioHead library has ASK example sketches that just print out whatever the remote sends. You should set that up and play with it.

aarg:
Sure. But it's hard to help someone on a forum alone because of the depth and extent of the subject matter. You have to do some basic research, and present questions that revolve around specific issues that you find. So the first stop for you, is all the documentation that you can find on the equipment. It's not just a beginner thing, it's what all successful developers have to do. Even after many years...

Have you seen this?
Using the RFM69 Radio | Adafruit Feather 32u4 Radio with RFM69HCW Module | Adafruit Learning System

I've read through that several times now and tried uploading the RadioHead69_RawDemo_RX it suggests. I get an error though here:

// If you are using a high power RF69 eg RFM69HW, you *must* set a Tx power with the
  // ishighpowermodule flag set like this:
  rf69.setTxPower(20, true);  // range from 14-20 for power, 2nd arg must be true for 69HCW

I don't have it in front of me but it says something to the effect of 'rf69.setTxPower not defined'. Which, I'm probably completely mistaken, but it's not transmitting anything so why would it need to define that in the first place?

aarg:
Also, it's not entirely inappropriate to say, "give up", because some projects are just too complicated for a beginner level developer. But it is more appropriate to suggest working through a large number of easier projects first. It's like math - you can't just jump into Calculus.

I understand what you're saying. It just seems though that this shouldn't be too complicated compared to what is out there. I'm pretty sure I understand the code enough to tell the board what to do when it receives the signal. It's just getting that signal to jump properly. I feel like I'm this close to getting it to do what I want, which is why I'm super frustrated with it.

The reason why I thought about building my own remote is that I saw a video where someone took two Feather M0 boards and had one the receiver and one the transmitter. They uploaded the RX and TX codes and it went off without a hitch because they spoke the same language. It would just be a matter then of when button 1 is pressed send button 1, and so on.

aarg:
The RadioHead library has ASK example sketches that just print out whatever the remote sends. You should set that up and play with it.

I'll look through the RadioHead library for that tonight when I get home. I didn't know that was in there. Thank you.

@WittBitt

Other post MERGED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.