Home Creators Posts Import Register Favorites Logout

Content

Here's another "deep dive" video looking at a particular component - in this case, it's 433MHz radio transmitter/receiver modules. These are readily-available in any electronics store as well as the usual import suppliers on the internet, and can be used as the basis to make wireless puzzle props that trigger, or are themselves triggered, by other nearby devices. 

I'll show you how to wire them up to an Arduino, how to create an aerial (ESSENTIAL - without that, the units will only transmit 1-2cm or so!) , and the code I use to send a batch of 100 messages as a test. Over a short distance (~30cm) inside, I get a 100% success rate of messages delivered. Over a distance of around 20m through a door and not in line-of-sight, that success rate goes down to around 63% - so I recommend you consider these units for continuously broadcasting a "beacon" signal, rather than a one-shot trigger which may not get received.

Wiring Diagram:

https://drive.google.com/open?id=1XHJKdb3pzbDPlPMvHUIICK21z7joqg6Q

Aerial Design:

https://drive.google.com/open?id=1nQxMnzAwLRjFFu5qNrIlkLYFLo7CJagb

Arduino Code - Transmitter:

https://drive.google.com/open?id=1FzUTRbLG3IxJSJam7D5fThDNoq9wzyNM

Arduino Code - Receiver:

https://drive.google.com/open?id=1u7kkziBOlf1dp99BsyoaUgMAgIJ8x6ab

Fritzing Project:

https://drive.google.com/open?id=1wlqyu0L7RFs89AubJ8XRH3K3Pr_97WVd 

  

Files

Radio-Frequency (RF) Communication Modules

Learn how to use cheap 433MHz radio transmitter and receiver modules to send data between Arduinos, such as might be used to create a wireless puzzle prop "beacon" that can send messages to trigger remote effects, or be triggered itself from a control system. Hardware Used: https://www.ebay.co.uk/itm/New-1-5PCS-315-433-Mhz-RF-Transmitter-Receiver-Wireless-Module-Arduino-ARMMCU/272472455163 Software Used: http://www.airspayce.com/mikem/arduino/VirtualWire/index.html

Comments

Patti Fales

Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno" D:\Documents\Arduino\Valves_puzzle\Valves_puzzle.ino:17:21: fatal error: FastLED.h: No such file or directory #include "FastLED.h" ^ compilation terminated. Error compiling for board Arduino/Genuino Uno. I keep getting that error message. Very new to this so don't know why.

Patti Fales

I don't if that was a reply or something about my error message?

Patti Fales

I tried to download another sketch arduino code and the same message comes up.

Patti Fales

Arduino: 1.8.6 (Windows Store 1.8.14.0) (Windows 10), Board: "Arduino/Genuino Uno" D:\Documents\Arduino\sketch_connect_wires_puzzle\sketch_connect_wires_puzzle.ino: In function 'void loop()': sketch_connect_wires_puzzle:66:46: error: 'isConnected' was not declared in this scope bool currentState = isConnected(pin1, pin2); ^ sketch_connect_wires_puzzle:72:20: error: 'ledpins' was not declared in this scope digitalWrite(ledpins[connections[i][0]], currentState); ^ sketch_connect_wires_puzzle:94:22: error: 'signalpins' was not declared in this scope Serial.print(signalpins[connections[i][0]]); ^ sketch_connect_wires_puzzle:100:29: error: 'f' was not declared in this scope Serial.println(f("---")); ^ sketch_connect_wires_puzzle:107:13: error: 'onSolve' was not declared in this scope onSolve(); ^ sketch_connect_wires_puzzle:111:15: error: 'onUnsolve' was not declared in this scope onUnsolve(); ^ This is the error I received today and to date, I still can't get anything to upload to an arduino 'isConnected' was not declared in this scope

Russell Hardman

The transmitter code is running without me pressing the button. All the button examples Ive seen use 5v on one side, gnd and resistor and a pin connection on the other. Your diagram just has pin and gnd if I’m reading it correctly. Is that right? Sorry if it’s a beginner question.

Russell Hardman

Looks like the button pin isn’t defined in the transmitter code. It must be defaulting to something. I added pinMode(2,INPUT_PULLUP) to setup() and all looks fine now. I’m using a Nano for transmit.

Mik

So im attempting to alter this code to trigger a relay on the receiver with a high/low from a reed switch on the transmitter, I have some ideas but was wondering what you think would be the most efficient and stable way to accomplish this?

Mike Pace

I think my comment got deleted. I apologize if it shows up twice. My question is, I am working oon a game where I want my players to put 7 specific things in a trunk, what is the best way for the game to know that the correct 7 things are in?