How to - two way communication via wifi w/ photon 2

I'm working on a project for a class that involves sending a wireless signal from one pcb to another, w/ the second pcb executing a function based on the data from the signal. So, I need two way communication. I'm still learning about RF, so I'm curious: do the photons need to be connected to an existing wifi server to communicate, or can I plug a battery into each pcb and have the photons talk without any external support? Also, as a side question, what coding language is the IDE in?

I recommend checking out the Bluetooth Low Energy functionality of the Photon 2. You can configure one device as a central and another as a peripheral.

As an alternative, you can use the Particle platform as an intermediary. Configure one device to publish to an event stream and another device to subscribe to the same event stream.

The event based approach would require the messages to be routed through a server while the BLE based approach does not require a server. Both approaches can be done wirelessly and on battery power.

Particle devices are programmed in C++.

Thank you!!