I dont understand clearly what you want to do
To control digital pins, in thinger library examples there is an example to control the led by console’s api and the mobile app, that is how it must be done the digital pin control
To control by a sensor value, just arduino coding, nothing involved with thinger platform, maybe by thinger platform you can establish the activation-deactivation value, but it is most arduino coding.
To control by another microcontroler sensor value, you need to make a device call, in documentation there are examples and I think that i saw something in the forum.
If you can be more explicit posting your issue it would be really helpful for us to understand what is going on, and as you say that you are a newbie I give you welcome and recommend you to take a look into documentation and the forum before to post any doubt, maybe it was solved previously.
Go for it