pibkpi
Posts: 1
Joined: Fri Sep 01, 2017 4:01 pm

RF transmission and receiving using python

Fri Sep 01, 2017 4:05 pm

HEY GUYS
I'm new to this. I was trying to send and receive strings/data using python.
I tried 433utils, but it is not supporting strings.
Is there any simple way to code?

User avatar
karrika
Posts: 1052
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: RF transmission and receiving using python

Fri Sep 01, 2017 5:16 pm

You could use bluetooth or WiFi. They are RF and work out of the box.

User avatar
penguintutor
Posts: 376
Joined: Tue May 08, 2012 9:11 am
Location: UK
Contact: Website

Re: RF transmission and receiving using python

Sat Sep 02, 2017 7:48 am

I'm not familiar with 433Utils, but it looks like it's a basic library for sending short command codes rather than transmitting data. It looks like it sends integer values as the command codes.

Presumably you could use that to send whatever data you wanted as long as the client and server are talking the same language, but it's going to be very slow for anything above very short strings.

If you want to send a string as a series of integers (which will be very inefficient) then you can convert your string into bytes ( https://docs.python.org/3/howto/unicode ... g-to-bytes ) then send each byte as though it was a command, but then convert it back into a string at the other end.

User avatar
joan
Posts: 14013
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: RF transmission and receiving using python

Sat Sep 02, 2017 10:14 am

Virtual Wire may be used to send strings.

http://abyz.me.uk/rpi/pigpio/examples.html#Python_vw

Return to “Python”