![]() This code snippet assumes that XY-MK-5V is connected to GPIO 18 and uses 1000 baud rate. Tx = virtualwire.tx(pi, 4, 1000) # Set pigpio instance, TX module GPIO pin and baud rate `import piVirtualWire.piVirtualWire as piVirtualWire piVirtualWire library is located in piVirtualWire subfolder. This code snippet assumes that FS1000A TX module ADAT (DATA) line is connected to GPIO 4 and uses 1000 baud rate. It depends on pigpio library and requires it installed on Raspberry Pi: wget .uk/rpi/pigpio/pigpio.zipĪnd running always in the background `sudo /home/pi/PIGPIO/pigpiod` So, with some effort I allowed myself to wrap this code into small python library and this is how piVirtualWire was created. I have found exactly one working implementation of VirtualWire library that is written in Python and works well with Raspberry Pi. For example with Arduino and Raspberry Pi. include // Load Virtual Wire Library so that RF ground.Unfortunately, problems starts when you want to do cross platform communication based on those modules and VirtualWire library. include Arduino.h // For communicating with the EagleTree Air Speed Sensor V3. I will not write about it right now, there is enough on the internet already. Specially in Arduino world, with VirtualWire library. Limited range and transmission speed limits their real life usage, but simple assembly and extremely easy programming are additional advantage over more complex solutions. Pair of those, allowing one way radio communication, const less than 3 dollars or euros. FS1000A and XY-MK-5V 433MHz RF modules are very often first choice for cheap and dirty Do It Yourself wireless communication.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |