How to power arduino nanos

i am creating a product for haunted houses to use.
it is a flashlight (or lantern) that the consumer can buy and have programed to do different things in different rooms.

my original idea to do this had each flashlight equipped with an uno and a RF transceiver.
there was also a base station for each room with an uno and a transceiver as well.
i had the base stations on a loop every so that every second they sent out a request to get a number i called the "progress" number from the flashlights.
if the progress number matched the number built into the base station, then it sent a "go ahead" and the program would execute and stop for another "go ahead"

it needs to go for the duration of the room and change later after it enters the next room.
but i have another issue where the flashlight would loop through all of the code in a matter of seconds.

am i going the right direction with this? is there some hardware i need to use or not use?
i would prefer to try and not use beam sensers or motion detectors or anything like that.

Hi, @thedestroyer99
Welcome to the forum.

Sorry, I had to get it into point form to make it easier to read.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

let me try to rephrase:

  • you have multiple slave devices that will take orders from a master device.
  • Communication between master and slaves is wireless

I would use and arduino connected to an HC12 or RF24 or Lora or similar types of radios where you can easily broadcast a message

An alternative would be — if the environment is suitable — to just have the Master as an ESP32 creating an hotspot and use ESP-NOW or plain TCP-IP over WiFi techniques to have the slaves discover the master and listen for commands.

the messages seems "small" so Lora would be a good choice even with a large house and thick walls.

hey! thank for the formatting adjustment. i appreciate it!

would there be a way to write the program(s) so it wont flash through all the programing?

also for the lora thing do you have any hardware recommendations?

Hi,

You might be best to draw a flowchart or diagram of what you want to have in exchanges between master and slaves.
If you are aiming ot have a master in each room, then you will have to provide some sort of ID system, to tell them apart.
The range of radio, WiFi can go through walls so you cannot isolate a master physically to its own room.

Tom... :smiley: :+1: :coffee: :australia:

yes i do plan to have a master in each room. the id system i was thinking of is the "progress counter" thing. basically in room one there is a master with a id of const int progress = 001 and in room two its const int progress = 002
the slave will have a int progress = 000 and when it enters room one it is set to int progress = 001 which will cause and if statment to run a line of code until progress = 002 is true, then it moves on to another code line.

But remember in your designing that all devices will be using the identical frequency for transmit and receive. You need a way to coordinate all transmissions.

how would i coordinate them?

im new to cpp and dont know everything it can do lol.
im a python person.

That is the million dollar piece you need to design! The rest is easy.

damn.. do you know what online editor i can use to test this? i dont have any hardware on hand.

If you design using IR communication and the IR from one room cannot be seen in an adjacent room, that could work.

i thought about that but the IR needs a direct line of sight and with each group of people being a different size and the end user placing the masters i cant be 100% sure that there will be a direct line of sight between the two.

would it be reasonable to use Bluetooth as the connection? just as a reminder i dont need masters connected to masters. only masters and slaves. it doesent matter if a master is connected to a master, its just not required

How would you break off connection from one master and make one with another? You really need to spend time researching rather than tossing out ideas.

1 Like

I'm not sure I understand the question well.

if the message is short enough you'll receive it in a few milliseconds so not sure it matters much

Not really a recommendation but I've used Heltec ESP32 Lora modules (https://heltec.org/proudct_center/) as well as TTGO ESP32 Lora modules (http://www.lilygo.cn) and both worked fine. You could of course also just buy a Lora module and wire it to a Nano or similar Arduino.

Having a built-in screen helped a lot with debug on site but you find modules without the screen and of course they are cheaper.

Nevertheless, wireless is not going to work at all because you cannot shield one room from another. RF will penetrate walls and pass through doorways readily.

What you need is simply multiple IR emitters placed around the ceiling. :sunglasses:

1 Like

That’s not an issue if the RF message tells which slave should do what. It’s actually a good thing if all the slaves do get the message

Isn’t it ? Did I miss something?

Nonsense! Put the IR transmitter in the ceiling of rooms and any receiver will see the IR signal. Just like your TV use of the IR remote can operate easily just using reflected light.

1 Like