$ S = \{(1/2)^n : n \in \mathbb{N} \} \cup \{ 0 \} $ is obviously bounded and infinite. It also looks totally disconnected to me (it is not and does not contain as its subset an interval with more than one element). But we know that a compact, totally disconnected set must be finite. Hence we know that $ S $ is not compact.
However, I'm having trouble seeing how this is the case. If $ S $ is not compact, then it must be possible to construct a sequence in $ S $ which contains no subsequences converging in $ S $, but I don't see how this is possible. Any sequence in a finite subset $ K \subset S $ will obviously have a subsequence which converges to $ K $, and it would seem to me that any sequence in an infinite subset $ H \subset S $ must have a subsequence which converges in $ H $ or to $ 0 $. Where is my error?
It is compact. Your error is in thinking that a compact, totally disconnected space must be finite: this is false. A compact discrete space must be finite, but a totally disconnected space need not be discrete, as the present example shows. An even better example is the Cantor set, which is totally disconnected but, unlike this space, does not even have any isolated points.