Skip to playerSkip to main content
  • 1 day ago
In this video, I have shown how you can build your own ISS(International Space Station) tracker using a NodeMCU board.

Link to the Code - https://github.com/Pushpendra766/spot-ISS
Transcript
00:00This is the ISS tracker and it helps me track the international space station.
00:05This simple device shows me the real time distance between ISS and my current location
00:10and notifies me whenever the ISS is in visibility at my location in the sky.
00:15ISS is the most expensive thing that human beings have made so far.
00:18It orbits around earth every 90 minutes and stays at an altitude of about 400 kilometers
00:24above the earth's surface. We can spot it during night when the sky is clear.
00:29So mostly during summer because the sky is much more clear during the summer.
00:33Moreover, NASA provides the current location of ISS publicly and also provides a free API for the same.
00:41Now here is an interesting thing. We can communicate with anyone using ISS radio repeater
00:46when it is passing over our location and if we are lucky we can even get a reply from the astronauts
00:52if they are on the radio at the same time. So I wanted to build a unique system that can notify me
00:58whenever the ISS passes over my location.
01:02So to build it I will use NodeMCU board because it has an integrated wi-fi shield that will help me
01:08to connect to the internet and call the NASA API for its current location.
01:12Then I will add a buzzer and a green LED to notify me when ISS is overhead.
01:17I will also use 7 red LEDs to show me the 7 different ranges of distance between my location
01:22and the ISS. So when I want to show maximum distance between us only one LED will glow
01:28and as the ISS comes closer to my location more and more LEDs will glow and when it is at minimum
01:34distance all the LEDs will glow. Coming to the coding part I have included some libraries.
01:42These two libraries are for NodeMCU and this one is for wi-fi client on the NodeMCU board.
01:47Arduino JSON library will be used to convert the longitude and latitude that we will receive in
01:51JSON data from ISS API to floating point numbers. Then I have included this utility library to use
01:57the paired data structure. Then I have declared these variables to store my wi-fi name and password
02:03and this is our API endpoint and I have declared my longitude and latitude here and here I declared our
02:10LEDs and buzzer and these are some variables that we will be using further as helper.
02:15Now let's see our setup part. Here I have declared pins for red LEDs, green LED and buzzer and this code
02:23will be used to connect NodeMCU to our wi-fi. Now let's see our functions. So get coordinates function
02:32will be used to call the API and pass longitude and latitude from it and then return them as pair
02:38of floating point numbers. Get distance function will accept the longitude and latitude of ISS as
02:45arguments and calculate the longitudinal distance between our location and ISS and then return it.
02:51ShowStatusOnLED function will glow the LEDs based on the distance that is written by get distance function.
02:58Now let's see our loop function. Here we are calling these functions every five seconds to update the
03:04status of LEDs. So that's pretty much our code and I will provide the link to this code in the description.
03:20So I have set my current location as the southern part of South America so it is right here and as
03:32the ISS get closer to it this LED will show status like this and when it will be just above it then
03:42this green LED will glow and the buzzer will buzz. Finally the green LED is started to blink and it means
03:52that we can see the ISS in the sky at this location.
03:57I hope you enjoyed the video and learned something new. If you enjoyed it hit that like button and
04:14subscribe to the channel. Thanks for watching and I will see you in the next one.
04:27I'll see you in the next one.
Be the first to comment
Add your comment

Recommended