Find the homotopy classes of maps $[S^n,S^1]$ and $[\mathbb RP^n, S^1],$ for $n \geq 2.$
I know the following theorem in the context of covering spaces.
Let $p : E \longrightarrow B$ be a covering map; let $p(e_0) = b_0.$ Let $f : Y \longrightarrow B$ be a continuous map, either $f(y_0) = b_0.$ Suppose $Y$ is path connected and locally path connected. The map $f$ can be lifted to a map $\widetilde {f} : Y \longrightarrow E$ such that $\widetilde {f} (y_0)) = e_0$ if and only if $$f_{*} (\pi_1 (Y,y_0) \subseteq p_* (\pi_1 (E,e_0)).$$
Furthermore, if such a lifting exists, it is unique.
With the help of the above theorem how do I deduce the required homotopy classes of maps?
I know that $\pi_1 (S^n) = 0,$ for $n \geq 2$ and $S^n$ is cleary path connected and locally path connected. Therefore with the help of the above theorem we can say that any map $f : S^n \longrightarrow S^1$ factors through $\mathbb R$ via the following composition of maps $$S^n \xrightarrow {\widetilde {f}} \mathbb R \xrightarrow {p} S^1$$ where $\widetilde {f}$ is the unique lifting of $f$ from $S^n$ to $\mathbb R$ and $p : \mathbb R \longrightarrow S^1$ is the covering map. Now how do I proceed? Does the contractibility of $\mathbb R$ play any role here?
For the second one I didn't able to conclude that $f_*(\pi_1(\mathbb R P^n)) = 0 = p_* (\pi_1(\mathbb R)).$ I know that $\pi_1(\mathbb R P^n) = \mathbb Z/2\mathbb Z.$ But how does it imply that $f_*(\pi_1(\mathbb R P^n)) = 0\ $? Which is needed to apply the above theorem.
Any help in this regard would be much appreciated. Thanks for your time.