In order to compile and use our program, follow the steps below:
- Proceed to the "~/contiki/examples/nbr_discovery" folder.
- Place the downloaded nbr_discovery.c file in the above folder.
- Open a terminal in this folder and use the following command in terminal to compile the program. "make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 nbr_discovery.bin CPU_FAMILY=cc26xx".
- Using UniFlash, upload the compiled nbr_discovery.bin file to the SensorTag - CC2650.
- After the program has been uploaded to the SensorTags, reboot the SensorTag.
In order to use the program in Cooja Simulator, follow the steps below:
- Proceed to the "~/contiki/examples/nbr_discovery" folder.
- Place the downloaded nbr_discovery.c file in the above folder.
- Open a terminal in this folder and use the following command in terminal to compile the program. "make TARGET=sky nbr_discovery.upload".
- Upon compilation, run Cooja using the "ant run" command in the "~/contiki/tools/cooja" directory.
- In Cooja, open the simulator file using "File->Open_simulation" in the GUI.
- Select the "nbr_discovery/cooja_nbr_discovery.csc" file.
- Run the simulation.