I want to synchronize two sender nodes to send the same signal at the same time to one receiver. I use the collect example. how can i use the time synchronization protocol of contiki in my code
Your description of your setup is rather vague and I am not familiar with the specific code segment you are talking about, so it is hard to compose a decent answer. However, If you have a code example, all you need to do is take it and use it as in the previous answer. Take note that some sync protocols do not offer a very precise synchronization or require a lot of calculation. You could look at for example 2-way message exchange type of protocols, or RBS to synchronize, or just let a sender transmit at a known time instant and take the hardware delays into account at the receiver. Those are all valid methods. However, they do not synchronize perfectly and need to be repeated regularly due to the clock skew. I don't know your setup, however, if it is possible, and you require a very precise synchronization, you could give an interrupt by sending a signal pulse to both senders at the same time, by means of a hardware modification, which is captured by an interrupt. This would provide you with the most precise setup.