开源国际空间站追踪器 ESP32/Arduino,成本20美元
Show HN: Open-Source International Space Station Tracker ESP32/Arduino for $20

原始链接: https://github.com/GuitarML/SpaceStationTracker

SpaceStationTracker 是一个STEM项目,它在一个售价20美元的基于ESP32的廉价黄屏显示器(CYD)上展示国际空间站的实时位置。它使用Arduino IDE,集成了LVGL图形库、WiFi连接、RESTful API数据获取(来自WhereTheISS.at)、JSON解析和触摸屏交互功能。 首先,CYD会创建一个WiFi热点,允许你通过网页配置设备的WiFi凭据,以确保安全。连接后,它会显示国际空间站的位置(包括经纬度和UTC时间),并自动更新,背景显示世界地图。点击国际空间站图标会显示一个随机事实。屏幕会调暗以节省电力。 设置包括在Arduino IDE中安装特定的库,包括ArduinoJson、HttpClient、LVGL、RTClib、TFT_eSPI、WiFiManager和XPT2046_Touchscreen。需要将自定义配置文件(User_Setup.h)放置到TFT_eSPI库中。你还需要替换lvgl库中的lv_conf.h文件。选择“ESP32 Dev Module”和“Huge App (3MB No OTA/1MB SPIFFS)”分区方案后,上传SpaceStationTracker.ino代码。 该项目提供了一个使用ESP32和CYD进行嵌入式编程的实践入门。该代码采用GPL 3.0许可证,可以改编用于追踪其他轨道物体,项目灵感来自Random Nerd Tutorials和Aura项目资源。

This Hacker News thread discusses an open-source International Space Station (ISS) tracker project built using an ESP32/Arduino and a cheap yellow display (CYD), costing around $20. The project displays the ISS's live location on a map via Wi-Fi and features a touchscreen and backlight power management. The creator, keyth72, promotes it as a beginner-friendly STEM project. Commenters share related resources, including a stunning photograph of the ISS and a cloud map service that could be integrated into the project. Some users suggest potential expansions, such as adding a GPS receiver to show the user's location or incorporating a Software Defined Radio (SDR) to listen in on ISS communications when overhead. Another user highlights a project that uses an arm to physically point to the ISS's location. The discussion also touches on the choice of a resistive touchscreen, with keyth72 citing familiarity and cost as factors, but acknowledging that capacitive touch could be superior.
相关文章

原文

SpaceStationTracker is an application that displays the current position of the International Space Station on a 2D world map. It runs on a ESP32-2432S028R ILI9341 device with a 2.8" screen, commonly known as the CYD "Cheap Yellow Display", which costs $20 or less. The code was written using Arduino IDE / ESP32 development environment in c++.

app

I used this project to learn programming for ESP32/Arduino/CYD. It includes topics such as graphics using LVGL, wifi connection, getting information from a restful API, parsing json data, and touchscreen interaction. This would make a great space related STEM classroom project.

As of the time of writing, the end of life for the ISS is slated for 2030. This code could be repurposed for other orbiting space objects.

Using the SpaceStationTracker

The SpaceStationTracker requires a local Wifi connection to retrieve location data for the International Space Station. The first time you load and run the app on the CYD, it will display a splash screen for how to connect. The ESP32 board will create a hotspot that you can then connect to from a phone or laptop. Choose your Wifi network and enter your credentials to connect the CYD to your Wifi. This is a safer method than hard coding Wifi info in the application, as with many esp32 DIY projects out there.

Once the app is connected to Wifi, it will continue to display and track the International Space Station. The esp32 will remember the last Wifi connection when cycling power, and if it changes you will be prompted to re connect using the above method.

app
The splashscreen will display on the CYD until it can connect to WiFi.

app
On a phone or computer, connect to the temporary WiFi access point called "SpaceStationTracker". It should show the screen above. Click "Configure WiFi".

app
Enter the WiFi network you wish to connect to (or select from the list) and enter your password. This is used for the ESP32 board to connect to your local WiFi. After a successful connection, the SpaceStationTracker app will load and begin tracking the International Space Station.

The Latitude, Longitude, and UTC date time is displayed in real time, updating from the Where The ISS At API. You can use the touchscreen and click on the ISS icon to display a random fact about the ISS.

The screen brightness will dim automatically over a few minutes to save power, and will go to full brightness again when the user interacts with the touchscreen.

I bought my CYD from this link on Amazon for less than $20, but many places sell them. Keep in mind there are several variations that can be called a CYD. Make sure it is the resistive touch (as opposed to capacitive touch), and 2.8 inch screen, otherwise this code will not work. The designator for this model is "ESP32-2432S028R" Some versions have a micro USB, and some have both a micro USB and USB C. Either USB should work, but keep in mind when getting a cable. I liked the above package from that particular Amazon seller, because it came with a USB micro cable and case for the board.

This is a great article on Random Nerd Tutorials to get you started with the CYD.

There is not a specific case for this project, but there are many 3D printed cases available for the CYD. Choose one that suits your needs, here are some examples. Be aware of the differences in the printable models if you want to use the micro USB vs. the USB C cable.

  1. Configure Arduino IDE
    a. For "esp32" board with a device type of "ESP32 Dev Module"
    b. Set "Tools -> Partition Scheme" to "Huge App (3MB No OTA/1MB SPIFFS)"
  2. Install the libraries below in Arduino IDE
  3. You can copy the entire SpaceStationTracker repository into ~/Documents/Arduino/
    a. User_Setup.h file for TFT_eSPI needs to be placed (overwrite to) the TFT_eSPI folder in ~/Documents/Arduino/libraries
    b. lv_conf.h file for LVGL needs to be placed in ~/Documents/Arduino/libraries/lvgl/src
  4. Plug in your CYD over USB to your computer, connect in the Arduino IDE, and compile and upload the SpaceStationTracker code using the Arduino IDE. To reset the CYD to get ready for install, you may need to hold the BOOT button, then press and release the RESET button, and then release the BOOT button. These are the small white buttons located on the back of the CYD board. They are labeled "RST" and BOOT".
  • ArduinoJson 7.4.1
  • HttpClient 2.2.0
  • lvgl 9.2.2
  • RTClib 2.1.4
  • TFT_eSPI 2.5.43_
  • WifiManager 2.0.17
  • XPT2046_Touchscreen 1.4

The SpaceStationTracker.ino code is under the terms of the GPL 3.0 license.

  • Thanks to WhereTheISS.at for the cool API!
  • ISS icon was resized from the ISS icon found on the NASA Website
  • Background worldmap was generated using Basemap (NASA Bluemarble, Mercator Projection)
  • Much info was gathered from Random Nerd Tutorials for CYD
  • Another really cool CYD app was used as a reference for Wifi login and splashscreen: Aura
  • The background worldmap and ISS icon were converted to c code using the LVGL Image Converter
联系我们 contact @ memedata.com