I want an output of 0 for the first 24 frames, 1 for the next 24 frames, 0 again for the next 24 frames and so on. That is, at frame one the output text is 0 and after 24 frames the output changes to 1 and after the next 24 frames the output changes to 0 again. How do I do this using animation nodes?
Here is an example,
1) Repeat node is giving values from 0 to 47 i.e 48 when the rate is 48.
2) Because repeat node also count 0, so I have substracted 1 from frame.
3) Then using compare boolean and switch nodes we can choose 0 for 0-23 frames (24) and for next 24-47 (24) frames, 1.
4) Last I use float text node to convert float to text and text object output to text-object.