[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
I have a radio link between two arduinos. The link can either
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 12
Thread images: 4
File: ardradio.png (719 KB, 1072x489) Image search: [Google]
ardradio.png
719 KB, 1072x489
I have a radio link between two arduinos. The link can either be high or low. The radio is not so good. If i try to send 125ms pulse the arduino on other end will get PulseIn of 130ms or 120ms.

Good thing about this radio is that the signal comes out clean and the radio takes care of encryption and authentication.

What kind of transmission protocol can i use?

I would need to transmit key presses. There is total of 32 keys. I would need to get key states at least every 200ms
>>
what radio module do you use?
>>
File: ardradio.png (46 KB, 457x371) Image search: [Google]
ardradio.png
46 KB, 457x371
>>53602045
24YK-RT/RX
>>
>>53602389
Forgot to say i only have one pin free on the arduino so i have to use some kind of serial protocol.
>>
>>53601841
Dude just say you're doing a keylogger, don't dance around it.

And even if you aren't (a wireless keyboard makes sense too) couldn't you theoretically just stream the raw USB data±? I haven't done much wireless work but with only two streams you should be fine
>>
what type of arduino are you using, also something fishy about the module plz post the page you bought it
>>
why no nrf24l01+?
there even exists a fuckin nice library
https://tmrh20.github.io/RF24/
>>
>>53603292
nvrmind found it on aliexpress, so considering thats its a 2$ module:

1. the crystal inside the module is not consistant or
2. the arduino is too slow and cant keep up
3. trying to debug with the serial too might be slowing down your arduino
4. your transmitter might not be fast enought to & transmit (?)
5. RF interferance from outside source (could be your pc or some cable line near you)

Either way troubleshooting RF is like magic.
>>
Usually, you just make your own protocol.

Points to consider:

If error detection is already done by radio hardware, things already simplified.
You only need to check if error data are discarded and need to re-transmit.

If no error detection done in physical layer (radio hardware), you'll need to prepare for some sort of parity/crc/etc.

Usually, people will use fixed width data for easier programming.
You'll have header byte(s), data type, data value, correction code, tail byte(s).

Head and tail must be unique value, so make sure no value collision exists.
Again, it's easier to use ascii (or utf8) rather than binary so you can avoid such collision.
eg:
head = $
data type = 02 (button 2 pressed)
data value = 1 (1 = button pressed)
tail=;
So you need to send $021;
>>
File: fuck yeah Misato.jpg (157 KB, 576x711) Image search: [Google]
fuck yeah Misato.jpg
157 KB, 576x711
>>53603333
oh sick you can use this for ghetto BTLE with small amounts of data, and there are a few arduino wrappers for the code. And they're not even a fucking dollar from china. Thanks anon!
>>
I have found DNP3 to be useful for radio though it can be a pain. With Modbus you would either lose data or only get a poll update every X polls. Anything that happened in between is gone. DNP3 can cache data and sends all data stored with that class when it is polled.
>>
>>53603665
No problem, m9 :^)
I really like em. Even connected an arduino to the internet with those chips, kek.
Thread replies: 12
Thread images: 4

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.